mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Don't pane focus when pane model is destroyed
This avoids a non-failure error message when resetting the environment in some specs.
This commit is contained in:
committed by
Antonio Scandurra
parent
5b07334993
commit
15ecbed61f
@@ -27,7 +27,7 @@ class PaneElement extends HTMLElement
|
||||
|
||||
subscribeToDOMEvents: ->
|
||||
handleFocus = (event) =>
|
||||
@model.focus() unless @isActivating or @contains(event.relatedTarget)
|
||||
@model.focus() unless @isActivating or @model.isDestroyed() or @contains(event.relatedTarget)
|
||||
if event.target is this and view = @getActiveView()
|
||||
view.focus()
|
||||
event.stopPropagation()
|
||||
|
||||
Reference in New Issue
Block a user