From 59d6ce006da3cb125252dfd98819daf65650781e Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 16 Apr 2016 14:43:15 +0100 Subject: Self code review re. ui-component focus handling. --- content_scripts/hud.coffee | 3 +-- content_scripts/ui_component.coffee | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee index 32662861..0bd1df3e 100644 --- a/content_scripts/hud.coffee +++ b/content_scripts/hud.coffee @@ -50,8 +50,7 @@ HUD = clearTimeout(@_showForDurationTimerId) @tween.stop() if immediate - @hudUI.hide() - Mode.setIndicator() if updateIndicator + if updateIndicator then Mode.setIndicator() else @hudUI.hide() else @tween.fade 0, 150, => @hide true, updateIndicator diff --git a/content_scripts/ui_component.coffee b/content_scripts/ui_component.coffee index 675b46c7..6aa22119 100644 --- a/content_scripts/ui_component.coffee +++ b/content_scripts/ui_component.coffee @@ -2,8 +2,8 @@ class UIComponent uiComponentIsReady: false iframeElement: null iframePort: null - iframeFrameId: null showing: false + iframeFrameId: null options: null shadowDOM: null styleSheetGetter: null @@ -119,5 +119,6 @@ class UIComponent request.open "GET", (chrome.runtime.getURL file), true request.send() + root = exports ? window root.UIComponent = UIComponent -- cgit v1.2.3