aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStephen Blott2016-01-29 14:16:20 +0000
committerStephen Blott2016-02-18 10:52:45 +0000
commitbe5205e6153e39d7c08f229c2b9183fab153f823 (patch)
treeaa4cd5b4716bc32fdfbd0b1535ab01799f67f528 /lib
parentfc9d6b16a2f0a2e405a2e74eea8e0e282a50f981 (diff)
downloadvimium-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')
-rw-r--r--lib/dom_utils.coffee10
-rw-r--r--lib/settings.coffee1
2 files changed, 8 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) ->
diff --git a/lib/settings.coffee b/lib/settings.coffee
index 79ee04a9..a33a88e8 100644
--- a/lib/settings.coffee
+++ b/lib/settings.coffee
@@ -170,6 +170,7 @@ Settings =
newTabUrl: "chrome://newtab"
grabBackFocus: false
regexFindMode: false
+ waitForEnterForFilteredHints: true # Once properly implmented, this will default to false.
settingsVersion: Utils.getCurrentVersion()
helpDialog_showAdvancedCommands: false