diff options
| -rw-r--r-- | background_scripts/main.coffee | 4 |
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. |
