aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-04-25 07:22:11 +0100
committerStephen Blott2015-04-25 07:23:41 +0100
commitf85c65bb664fdc29b7c45c579ead4481238a24e0 (patch)
treecc5af6403ab9e456503a18d28a55bf536c86ecd2
parent9100b1d48aa9c09d792d9e2c9251e6a6c62f81bf (diff)
downloadvimium-f85c65bb664fdc29b7c45c579ead4481238a24e0.tar.bz2
Activate vomnibar in window.top; do not register framesets.
When the vomnibar closes, it focuses its enclosing window. If that is a frameset, then we do not want to inadvertently register it.
-rw-r--r--background_scripts/main.coffee4
1 files changed, 3 insertions, 1 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index a26fd8a8..94cbb08e 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -597,7 +597,9 @@ unregisterFrame = (request, sender) ->
handleFrameFocused = (request, sender) ->
tabId = sender.tab.id
urlForTab[tabId] = request.url
- if frameIdsForTab[tabId]?
+ # Cycle frameIdsForTab to the focused frame. However, also ensure that we don't inadvertently register a
+ # frame which wasn't previously registered (such as a frameset).
+ if frameIdsForTab[tabId]? and request.frameId in frameIdsForTab[tabId]
frameIdsForTab[tabId] =
[request.frameId, (frameIdsForTab[tabId].filter (id) -> id != request.frameId)...]
# Inform all frames that a frame has received the focus.