attempt to fix focus crash issue

This commit is contained in:
Nolan Lawson 2018-03-22 19:56:08 -07:00
parent 62ef9d7bb0
commit a03961f379

View file

@ -256,6 +256,7 @@
this.store.setForCurrentTimeline({ ignoreBlurEvents: true })
},
saveFocus(e) {
try {
let instanceName = this.store.get('currentInstance')
let timelineName = this.get('timeline')
let lastFocusedElementSelector
@ -270,8 +271,12 @@
this.store.setForTimeline(instanceName, timelineName, {
lastFocusedElementSelector
})
} catch (err) {
console.error('unable to save focus', err)
}
},
clearFocus() {
try {
if (this.store.get('ignoreBlurEvents')) {
return
}
@ -281,6 +286,9 @@
this.store.setForTimeline(instanceName, timelineName, {
lastFocusedElementSelector: null
})
} catch (err) {
console.error('unable to clear focus', err)
}
}
}
}