From f85c65bb664fdc29b7c45c579ead4481238a24e0 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 25 Apr 2015 07:22:11 +0100 Subject: 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. --- background_scripts/main.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'background_scripts') 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. -- cgit v1.2.3