From 3863e724241408338c9c69af72117584c1258d34 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Sun, 23 Nov 2014 12:45:11 +0000 Subject: Don't record frameIds for frames only containing a frameset Frameset frames have no content of their own -- they only embed other pages in sub-frames. The user can't perform any actions (of ours or the browsers) with a frameset focused, so we might as well just not focus it. --- background_scripts/main.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 0c969aed..aac63213 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -598,6 +598,7 @@ openOptionsPageInNewTab = -> registerFrame = (request, sender) -> frames = frameIdsForTab[sender.tab.id] ?= [] + return if request.is_frameset # Don't store frameset containers; focusing them is no use. if request.is_top frames.unshift request.frameId else @@ -609,7 +610,7 @@ unregisterFrame = (request, sender) -> if request.is_top # The whole tab is closing, so we can drop the frames list. updateOpenTabs sender.tab - else + else if not request.if_frameset index = frames.indexOf request.frameId return if index == -1 frames.splice index, 1 -- cgit v1.2.3