From 4c4e16ac3bd2b1cc7ec2416ead90ae33f769d077 Mon Sep 17 00:00:00 2001 From: Katrina Uychaco Date: Thu, 24 Dec 2015 12:29:22 -0800 Subject: [PATCH] Fix bug in ::activateItem Only destroy active item if it is not the same as the new item. --- src/pane.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pane.coffee b/src/pane.coffee index 4e97e8bdc..b0758f4c4 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -345,7 +345,7 @@ class Pane extends Model if item? if @activeItem?.isPending?() index = @getActiveItemIndex() - @destroyActiveItem() + @destroyActiveItem() unless item is @activeItem else index = @getActiveItemIndex() + 1 @addItem(item, index, false) @@ -580,7 +580,6 @@ class Pane extends Model # Public: Makes this pane the *active* pane, causing it to gain focus. activate: -> throw new Error("Pane has been destroyed") if @isDestroyed() - @container?.setActivePane(this) @emitter.emit 'did-activate'