Fix focus on tab when changing via back button

This commit is contained in:
Paulus Schoutsen 2016-02-06 23:32:33 -08:00
parent d70dd0b2d0
commit 374d9a0514

View File

@ -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();
},