Fixing focus on diff preferences

The auto focus was broken when diff preferencies diff were open

Change-Id: Icaf4c86dc3405cce390570f8c1a38e4a3f317845
This commit is contained in:
Milutin Kristofic
2019-09-05 14:20:24 +02:00
parent 93e703e8de
commit aa2ee9b347
2 changed files with 6 additions and 2 deletions

View File

@@ -34,13 +34,13 @@
getFocusStops() { getFocusStops() {
return { return {
start: this.$.contextSelect, start: this.$.diffPreferences.$.contextSelect,
end: this.$.saveButton, end: this.$.saveButton,
}; };
}, },
resetFocus() { resetFocus() {
this.$.contextSelect.focus(); this.$.diffPreferences.$.contextSelect.focus();
}, },
_computeHeaderClass(changed) { _computeHeaderClass(changed) {

View File

@@ -60,6 +60,10 @@
this.bindValue = this.nativeSelect.value; this.bindValue = this.nativeSelect.value;
}, },
focus() {
this.nativeSelect.focus();
},
ready() { ready() {
// If not set via the property, set bind-value to the element value. // If not set via the property, set bind-value to the element value.
if (this.bindValue == undefined) { if (this.bindValue == undefined) {