aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/link_hints.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-04-17 11:57:16 +0100
committerStephen Blott2016-04-17 11:57:16 +0100
commitcefbb461a3b564845a61893fcbe5faa0084c6f4c (patch)
tree38743486ac59f76462d6d6da9c8c90038c467834 /content_scripts/link_hints.coffee
parent014f53fb091ac8672d3efbeca13a494c15d8afcb (diff)
parent5c3e4bda2968486e23f8cc3410e776de67fec849 (diff)
downloadvimium-cefbb461a3b564845a61893fcbe5faa0084c6f4c.tar.bz2
Merge pull request #2100 from smblott-github/rework-ui-component-focus-handling
Rework ui component focus handling
Diffstat (limited to 'content_scripts/link_hints.coffee')
-rw-r--r--content_scripts/link_hints.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index f2b9cd0f..702ff69d 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -334,7 +334,7 @@ class LinkHintsMode
flashEl = DomUtils.addFlashRect linkMatched.rect
HintCoordinator.onExit.push -> DomUtils.removeElement flashEl
- if document.hasFocus()
+ if windowIsFocused()
startKeyboardBlocker (isSuccess) -> HintCoordinator.sendMessage "exit", {isSuccess}
# If we're using a keyboard blocker, then the frame with the focus sends the "exit" message, otherwise the
@@ -613,12 +613,12 @@ LocalHints =
isClickable ||= element.control? and (@getVisibleClickable element.control).length == 0
when "body"
isClickable ||=
- if element == document.body and not document.hasFocus() and
+ if element == document.body and not windowIsFocused() and
window.innerWidth > 3 and window.innerHeight > 3 and
document.body?.tagName.toLowerCase() != "frameset"
reason = "Frame."
isClickable ||=
- if element == document.body and document.hasFocus() and Scroller.isScrollableElement element
+ if element == document.body and windowIsFocused() and Scroller.isScrollableElement element
reason = "Scroll."
when "div", "ol", "ul"
isClickable ||=