mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-18 16:16:38 +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,
|
||||
view => view || '',
|
||||
],
|
||||
observer: 'removeFocus',
|
||||
},
|
||||
|
||||
views: {
|
||||
@ -119,6 +120,13 @@ export default new Polymer({
|
||||
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() {
|
||||
syncActions.fetchAll();
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user