diff options
| author | Stephen Blott | 2016-04-18 07:56:18 +0100 |
|---|---|---|
| committer | Stephen Blott | 2016-04-18 07:56:18 +0100 |
| commit | d0d958b88776bdaff803707167ff1ada92d9b872 (patch) | |
| tree | 63d8d8218face67dba52a6534cf6b8df3162ce56 | |
| parent | 289798866a332f52253c4c52f8d6874211d25611 (diff) | |
| download | vimium-d0d958b88776bdaff803707167ff1ada92d9b872.tar.bz2 | |
Abandon HUD on help-dialog close.
If the help dialog loses the focus and closes, then we abandon any HUD
which is being displayed. This ensures that - when the help dialog is
reopenned - we're not displaying an old, out-of-date HUD message.
| -rw-r--r-- | content_scripts/hud.coffee | 1 | ||||
| -rw-r--r-- | pages/help_dialog.coffee | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee index 7ad13aaf..4ba8557c 100644 --- a/content_scripts/hud.coffee +++ b/content_scripts/hud.coffee @@ -7,6 +7,7 @@ HUD = hudUI: null _displayElement: null findMode: null + abandon: -> @hudUI?.hide false # This HUD is styled to precisely mimick the chrome HUD on Mac. Use the "has_popup_and_link_hud.html" # test harness to tweak these styles to match Chrome's. One limitation of our HUD display is that diff --git a/pages/help_dialog.coffee b/pages/help_dialog.coffee index b2d33f95..373aa94a 100644 --- a/pages/help_dialog.coffee +++ b/pages/help_dialog.coffee @@ -69,9 +69,13 @@ UIComponentServer.registerHandler (event) -> HelpDialog.init() HelpDialog.show event.data Frame.postMessage "registerFrame" + # If we abandoned (see below) in a mode with a HUD indicator, then we have to reinstate it. + Mode.setIndicator() when "hidden" # Unregister the frame, so that it's not available for `gf` or link hints. Frame.postMessage "unregisterFrame" + # Abandon any HUD which might be showing within the help dialog. + HUD.abandon() root = exports ? window root.HelpDialog = HelpDialog |
