Permalink
Browse files

Closing a named window should remove tab by that name.

  • Loading branch information...
1 parent 9f2d368 commit 7263b51e9caac987945def97619dd385aba98578 @assaf committed Nov 30, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/zombie/tabs.coffee
@@ -91,7 +91,7 @@ createTabs = (browser)->
find:
value: (name)->
if tabs.propertyIsEnumerable(name)
- return this[name]
+ return tabs[name]
for window in this
if window.name == name
return window
@@ -127,6 +127,8 @@ createTabs = (browser)->
if ~index
browser.emit("inactive", window)
tabs.splice(index, 1)
+ if tabs.propertyIsEnumerable(window.name)
+ delete tabs[window.name]
# If we closed the currently open tab, need to select another window.
if window == current
# Don't emit inactive event for closed window.

0 comments on commit 7263b51

Please sign in to comment.