mirror of https://github.com/keeweb/keeweb.git
fix #1745: deleting selected text in auto-type selector
This commit is contained in:
parent
1593acd8e9
commit
0def3f8b2d
|
@ -177,10 +177,18 @@ class AutoTypeSelectView extends View {
|
||||||
|
|
||||||
backSpacePressed() {
|
backSpacePressed() {
|
||||||
if (this.model.filter.text) {
|
if (this.model.filter.text) {
|
||||||
this.model.filter.text = this.model.filter.text.substr(
|
const input = this.el.querySelector('.at-select__header-filter-input');
|
||||||
0,
|
if (input.selectionStart < input.selectionEnd) {
|
||||||
this.model.filter.text.length - 1
|
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();
|
this.render();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ Release notes
|
||||||
-------------
|
-------------
|
||||||
##### v1.17.2 (TBD)
|
##### v1.17.2 (TBD)
|
||||||
`-` fixed crashes in the USB module on Windows
|
`-` fixed crashes in the USB module on Windows
|
||||||
|
`-` fix #1745: deleting selected text in auto-type selector
|
||||||
|
|
||||||
##### v1.17.1 (2021-03-10)
|
##### v1.17.1 (2021-03-10)
|
||||||
`-` fix #1735: issue with auto-typing some characters on Windows
|
`-` fix #1735: issue with auto-typing some characters on Windows
|
||||||
|
|
Loading…
Reference in New Issue