mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Activate next pane on before invoking onDidDestroy observers
This commit is contained in:
@@ -90,7 +90,7 @@ describe "PaneContainer", ->
|
||||
expect(observed).toEqual [pane1.itemAtIndex(0), pane2.itemAtIndex(0)]
|
||||
|
||||
describe "::observePanes()", ->
|
||||
it "invokes with subscribers with all current and future panes", ->
|
||||
it "invokes observers with all current and future panes", ->
|
||||
container = new PaneContainer
|
||||
container.getRoot().splitRight()
|
||||
[pane1, pane2] = container.getPanes()
|
||||
|
||||
@@ -479,8 +479,8 @@ class Pane extends Model
|
||||
|
||||
# Called by model superclass.
|
||||
destroyed: ->
|
||||
@emitter.emit 'did-destroy'
|
||||
@container.activateNextPane() if @isActive()
|
||||
@emitter.emit 'did-destroy'
|
||||
item.destroy?() for item in @items.slice()
|
||||
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user