diff --git a/app/scripts/views/auto-type/auto-type-select-view.js b/app/scripts/views/auto-type/auto-type-select-view.js index fff596b4..80a9e0dd 100644 --- a/app/scripts/views/auto-type/auto-type-select-view.js +++ b/app/scripts/views/auto-type/auto-type-select-view.js @@ -177,10 +177,18 @@ class AutoTypeSelectView extends View { backSpacePressed() { if (this.model.filter.text) { - this.model.filter.text = this.model.filter.text.substr( - 0, - this.model.filter.text.length - 1 - ); + const input = this.el.querySelector('.at-select__header-filter-input'); + if (input.selectionStart < input.selectionEnd) { + this.model.filter.text = + this.model.filter.text.substr(0, input.selectionStart) + + this.model.filter.text.substr(input.selectionEnd); + input.selectionStart = input.selectionEnd = 0; + } else { + this.model.filter.text = this.model.filter.text.substr( + 0, + this.model.filter.text.length - 1 + ); + } this.render(); } } diff --git a/release-notes.md b/release-notes.md index 35952f58..034709ab 100644 --- a/release-notes.md +++ b/release-notes.md @@ -2,6 +2,7 @@ Release notes ------------- ##### v1.17.2 (TBD) `-` fixed crashes in the USB module on Windows +`-` fix #1745: deleting selected text in auto-type selector ##### v1.17.1 (2021-03-10) `-` fix #1735: issue with auto-typing some characters on Windows