Fix focus on tab when changing via back button
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…
Reference in New Issue