perf: 优化文件界面正在输入时,使Ctrl/Cmd+A恢复正常

This commit is contained in:
jmal 2022-08-28 14:52:13 +08:00
parent 16036c6c1a
commit 67e952e47e

View File

@ -934,7 +934,7 @@ export default {
}
// ctrl + A / cmd + A
if (this.isCmd && keyCode == 65) {
if (this.inputting) {
if (this.inputting || this.editingIndex !== -1) {
event.target.select()
} else {
this.$nextTick(() => {
@ -2333,6 +2333,7 @@ export default {
},
// 选取输入框部分内容
renameInputFocus(doc, suffix) {
this.setInputFocus()
doc.focus()
doc.selectionStart = 0
doc.selectionEnd = doc.value.length