mirror of https://github.com/keeweb/keeweb
fix #1505: pre-selecting first field in auto-type dropdown
parent
1617cae518
commit
f489eca5c2
|
@ -232,7 +232,7 @@ class AutoTypeSelectView extends View {
|
|||
this.highlightActive();
|
||||
}
|
||||
|
||||
const view = new DropdownView();
|
||||
const view = new DropdownView({ selectedOption: 0 });
|
||||
this.listenTo(view, 'cancel', this.hideItemOptionsDropdown);
|
||||
this.listenTo(view, 'select', this.itemOptionsDropdownSelect);
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ class DropdownView extends View {
|
|||
this.once('remove', () => {
|
||||
$('body').off('click contextmenu keydown', this.bodyClick);
|
||||
});
|
||||
|
||||
this.selectedOption = model.selectedOption;
|
||||
}
|
||||
|
||||
render(config) {
|
||||
|
@ -47,6 +49,9 @@ class DropdownView extends View {
|
|||
top = Math.max(0, bodyRect.bottom - ownRect.height);
|
||||
}
|
||||
this.$el.css({ top, left });
|
||||
if (typeof this.selectedOption === 'number') {
|
||||
this.renderSelectedOption();
|
||||
}
|
||||
}
|
||||
|
||||
bodyClick(e) {
|
||||
|
|
|
@ -124,6 +124,7 @@ $fa-var-inbox: next-fa-glyph();
|
|||
$fa-var-save: next-fa-glyph();
|
||||
$fa-var-hdd: next-fa-glyph();
|
||||
$fa-var-dot-circle: next-fa-glyph();
|
||||
$fa-var-user: next-fa-glyph();
|
||||
$fa-var-user-lock: next-fa-glyph();
|
||||
$fa-var-terminal: next-fa-glyph();
|
||||
$fa-var-print: next-fa-glyph();
|
||||
|
|
|
@ -4,6 +4,7 @@ Release notes
|
|||
`+` automatically switching between dark and light theme
|
||||
`+` clear searchbox button
|
||||
`+` favicon download improvements
|
||||
`+` auto-type field selection dropdown improvements
|
||||
|
||||
##### v1.16.5 (2020-12-18)
|
||||
`-` using custom OneDrive without a secret
|
||||
|
|
Loading…
Reference in New Issue