From f32dfbfc650a873d1f91ac3fb21383fb02423c7f Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Sat, 2 Dec 2017 18:49:42 +0000 Subject: Only send link hints messages to frames which have registered This puts link hints frame behaviour back to matching fb00eaa6bd4ee8889d10a9ef9d976fefd3be7879 In particular, we go back to not sending link hints messages to frames that are too small (according to DomUtils.windowIsTooSmall). --- background_scripts/main.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index d87109f4..e3188a26 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -389,7 +389,8 @@ HintCoordinator = prepareToActivateMode: (tabId, originatingFrameId, {modeIndex, isVimiumHelpDialog}) -> @tabState[tabId] = {frameIds: frameIdsForTab[tabId][..], hintDescriptors: {}, originatingFrameId, modeIndex} - @tabState[tabId].ports = extend {}, portsForTab[tabId] + @tabState[tabId].ports = {} + frameIdsForTab[tabId].map (frameId) => @tabState[tabId].ports[frameId] = portsForTab[tabId][frameId] @sendMessage "getHintDescriptors", tabId, {modeIndex, isVimiumHelpDialog} # Receive hint descriptors from all frames and activate link-hints mode when we have them all. -- cgit v1.2.3