aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2014-11-02 08:56:15 +0000
committerStephen Blott2014-11-02 08:56:15 +0000
commit3bae8f0f8fc012720001caced69999160d9005fa (patch)
tree896f52810677beac492d8d24759dc3b31e93f351 /content_scripts
parent28e9c8374bfc7a4fd479dbb958a4a87331fb0857 (diff)
downloadvimium-3bae8f0f8fc012720001caced69999160d9005fa.tar.bz2
Centralize handling of event propagation.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/vimium_frontend.coffee6
-rw-r--r--content_scripts/vomnibar.coffee2
2 files changed, 4 insertions, 4 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 93d0bcd2..8f4c0f2a 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -438,7 +438,7 @@ onKeydown = (event) ->
handledKeydownEvents.push event
else if (!modifiers)
- event.stopImmediatePropagation()
+ DomUtils.suppressPropagation(event)
handledKeydownEvents.push event
else if (isShowingHelpDialog && KeyboardUtils.isEscape(event))
@@ -470,7 +470,7 @@ onKeydown = (event) ->
if (keyChar == "" && !isInsertMode() &&
(currentCompletionKeys.indexOf(KeyboardUtils.getKeyChar(event)) != -1 ||
isValidFirstKey(KeyboardUtils.getKeyChar(event))))
- event.stopImmediatePropagation()
+ DomUtils.suppressPropagation(event)
handledKeydownEvents.push event
onKeyup = (event) ->
@@ -486,7 +486,7 @@ onKeyup = (event) ->
event.keyCode == keydown.keyCode
handledKeydownEvents.splice i, 1
- event.stopImmediatePropagation()
+ DomUtils.suppressPropagation(event)
break
checkIfEnabledForUrl = ->
diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee
index 8c6b2059..f1d2ccc5 100644
--- a/content_scripts/vomnibar.coffee
+++ b/content_scripts/vomnibar.coffee
@@ -139,7 +139,7 @@ class VomnibarUI
@hide()
# It seems like we have to manually suppress the event here and still return true.
- event.stopImmediatePropagation()
+ DomUtils.suppressPropagation(event)
event.preventDefault()
true