mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-19 00:26:33 +00:00
Fix focus on tab when changing via back button
This commit is contained in:
parent
d70dd0b2d0
commit
374d9a0514
@ -69,6 +69,7 @@ export default new Polymer({
|
|||||||
viewGetters.currentView,
|
viewGetters.currentView,
|
||||||
view => view || '',
|
view => view || '',
|
||||||
],
|
],
|
||||||
|
observer: 'removeFocus',
|
||||||
},
|
},
|
||||||
|
|
||||||
views: {
|
views: {
|
||||||
@ -119,6 +120,13 @@ export default new Polymer({
|
|||||||
this.columns = Math.max(1, matchColumns - this.showMenu);
|
this.columns = Math.max(1, matchColumns - this.showMenu);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// When user changes tab by pressing back button, blur former tab
|
||||||
|
removeFocus() {
|
||||||
|
if (document.activeElement) {
|
||||||
|
document.activeElement.blur();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
handleRefresh() {
|
handleRefresh() {
|
||||||
syncActions.fetchAll();
|
syncActions.fetchAll();
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user