diff options
| author | Stephen Blott | 2016-01-29 14:16:20 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2016-02-18 10:52:45 +0000 | 
| commit | be5205e6153e39d7c08f229c2b9183fab153f823 (patch) | |
| tree | aa4cd5b4716bc32fdfbd0b1535ab01799f67f528 /lib/dom_utils.coffee | |
| parent | fc9d6b16a2f0a2e405a2e74eea8e0e282a50f981 (diff) | |
| download | vimium-be5205e6153e39d7c08f229c2b9183fab153f823.tar.bz2 | |
Wait-for-enter: for filtered hints.
This affects filtered hints only.
If a hint is triggered because the user typed the link text, then:
- highlight the link
- but wait until the user types `Enter` before activating the link.
Diffstat (limited to 'lib/dom_utils.coffee')
| -rw-r--r-- | lib/dom_utils.coffee | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 7473df17..db90c43a 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -262,8 +262,7 @@ DomUtils =        # but Webkit will. Dispatching a click on an input box does not seem to focus it; we do that separately        element.dispatchEvent(mouseEvent) -  # momentarily flash a rectangular border to give user some visual feedback -  flashRect: (rect) -> +  addFlashRect: (rect) ->      flashEl = @createElement "div"      flashEl.id = "vimiumFlash"      flashEl.className = "vimiumReset" @@ -271,7 +270,12 @@ DomUtils =      flashEl.style.top = rect.top  + window.scrollY  + "px"      flashEl.style.width = rect.width + "px"      flashEl.style.height = rect.height + "px" -    document.documentElement.appendChild(flashEl) +    document.documentElement.appendChild flashEl +    flashEl + +  # momentarily flash a rectangular border to give user some visual feedback +  flashRect: (rect) -> +    flashEl = @addFlashRect rect      setTimeout((-> DomUtils.removeElement flashEl), 400)    suppressPropagation: (event) -> | 
