mirror of https://github.com/keeweb/keeweb
fix #1745: deleting selected text in auto-type selector
parent
1593acd8e9
commit
0def3f8b2d
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue