aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-02-14 12:06:18 +0000
committerStephen Blott2015-02-14 12:06:18 +0000
commit9bd6b7814fbee5508a4a746789d10c687a2c0c9b (patch)
treeb35243271ae4cc775e392713a3aca85d4057ec2d
parent6d776a9f56f05e4298577f25f0a54b924cb1f6e6 (diff)
parent647ee056d2390b1950dc9a72b7ee789d801201ea (diff)
downloadvimium-9bd6b7814fbee5508a4a746789d10c687a2c0c9b.tar.bz2
Merge pull request #1476 from mrmr1993/dont-clear-frame-data-on-url-change
Retain frame data for a tab unless the top frame tells us its closing
-rw-r--r--background_scripts/main.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 0d33b7f7..d034ffb0 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -321,7 +321,7 @@ selectTab = (callback, direction) ->
selectionChangedHandlers.push(callback)
chrome.tabs.update(toSelect.id, { selected: true })))
-updateOpenTabs = (tab) ->
+updateOpenTabs = (tab, deleteFrames = false) ->
# Chrome might reuse the tab ID of a recently removed tab.
if tabInfoMap[tab.id]?.deletor
clearTimeout tabInfoMap[tab.id].deletor
@@ -333,7 +333,7 @@ updateOpenTabs = (tab) ->
scrollY: null
deletor: null
# Frames are recreated on refresh
- delete frameIdsForTab[tab.id]
+ delete frameIdsForTab[tab.id] if deleteFrames
setBrowserActionIcon = (tabId,path) ->
chrome.browserAction.setIcon({ tabId: tabId, path: path })
@@ -616,7 +616,7 @@ unregisterFrame = (request, sender) ->
tabId = sender.tab.id
if frameIdsForTab[tabId]?
if request.tab_is_closing
- updateOpenTabs sender.tab
+ updateOpenTabs sender.tab, true
else
frameIdsForTab[tabId] = frameIdsForTab[tabId].filter (id) -> id != request.frameId