diff options
| -rw-r--r-- | background_page.html | 10 | ||||
| -rw-r--r-- | vimiumFrontend.js | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/background_page.html b/background_page.html index 1efd6ae0..8abe2f9e 100644 --- a/background_page.html +++ b/background_page.html @@ -153,9 +153,9 @@ returnPort.postMessage({ zoomLevel: zoomLevel }); } - function showHelp() { + function showHelp(callback, frameId) { chrome.tabs.getSelected(null, function(tab) { - chrome.tabs.sendRequest(tab.id, { name: "showHelpDialog", dialogHtml: helpDialogHtml() }); + chrome.tabs.sendRequest(tab.id, { name: "showHelpDialog", dialogHtml: helpDialogHtml(), frameId:frameId }); }); } @@ -271,9 +271,9 @@ if (selectionChangedHandlers.length > 0) { selectionChangedHandlers.pop().call(); } }); - function repeatFunction(func, totalCount, currentCount) { + function repeatFunction(func, totalCount, currentCount, frameId) { if (currentCount < totalCount) - func(function() { repeatFunction(func, totalCount, currentCount + 1); }); + func(function() { repeatFunction(func, totalCount, currentCount + 1, frameId); }, frameId); } // Returns the scroll coordinates of the given tab. Pass in a callback of the form: @@ -523,7 +523,7 @@ refreshedCompletionKeys = true; } else { - repeatFunction(this[registryEntry.command], count, 0); + repeatFunction(this[registryEntry.command], count, 0, frameId); } newKeyQueue = ""; diff --git a/vimiumFrontend.js b/vimiumFrontend.js index 331e9afe..829ded5e 100644 --- a/vimiumFrontend.js +++ b/vimiumFrontend.js @@ -66,7 +66,7 @@ function initializePreDomReady() { if (isShowingHelpDialog) hideHelpDialog(); else - showHelpDialog(request.dialogHtml); + showHelpDialog(request.dialogHtml, request.frameId); else if (request.name == "refreshCompletionKeys") refreshCompletionKeys(request.completionKeys); sendResponse({}); // Free up the resources used by this open connection. @@ -475,8 +475,8 @@ function exitFindMode() { HUD.hide(); } -function showHelpDialog(html) { - if (isShowingHelpDialog || !document.body) +function showHelpDialog(html, fid) { + if (isShowingHelpDialog || !document.body || fid != frameId) return; isShowingHelpDialog = true; var container = document.createElement("div"); |
