From e60066218806ca42ebe94fd1ce0042993909658d Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 16 Apr 2016 15:20:45 +0100 Subject: Reinstate vomnibar from within help dialog. --- content_scripts/vimium_frontend.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 537dbaa9..023952c1 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -119,12 +119,12 @@ class NormalMode extends KeyHandlerMode You have asked Vimium to perform #{count} repetitions of the command: #{registryEntry.description}.\n Are you sure you want to continue?""" - if registryEntry.topFrame and window.isVimiumUIComponent? and window.isVimiumUIComponent - # We cannot use "topFrame" commands, most notably the Vomnibar, from within a UI component. - HUD.showForDuration "#{registryEntry.command} cannot be used here.", 2000 - else if registryEntry.topFrame + if registryEntry.topFrame + # The Vomnibar (a top-frame command) cannot coexist with the help dialog (it causes focus issues). + sourceFrameId = if HelpDialog.isShowing() and window.isVimiumUIComponent then 0 else frameId + HelpDialog.toggle() if HelpDialog.isShowing() chrome.runtime.sendMessage - handler: "sendMessageToFrames", message: {name: "runInTopFrame", sourceFrameId: frameId, registryEntry} + handler: "sendMessageToFrames", message: {name: "runInTopFrame", sourceFrameId, registryEntry} else if registryEntry.background chrome.runtime.sendMessage {handler: "runBackgroundCommand", registryEntry, count} else -- cgit v1.2.3