aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/mode.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts/mode.coffee')
-rw-r--r--content_scripts/mode.coffee21
1 files changed, 0 insertions, 21 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee
index 98d3df80..ebb3e8bc 100644
--- a/content_scripts/mode.coffee
+++ b/content_scripts/mode.coffee
@@ -119,30 +119,9 @@ class Mode
@passKeys = passKeys
@registerStateChange?()
- # If @options.suppressPrintableEvents is truthy, then it should be an element. All printable keyboard
- # events on that element are suppressed, if necessary. They are suppressed *after* bubbling down the
- # handler stack and finding no handler. This is used by PostFindMode to protect active, editable
- # elements. Note, this handler is installed with unshift (not push), so it ends is installed at the
- # *bottom* of the handler stack, and sees keyboard events only after other modes (notably, normal mode)
- # have not handled them.
- if @options.suppressPrintableEvents
- do =>
- handler = (event) =>
- if event.srcElement == @options.suppressPrintableEvents and KeyboardUtils.isPrintable event
- @suppressEvent
- else
- @continueBubbling
-
- @unshift
- _name: "mode-#{@id}/suppressPrintableEvents"
- keydown: handler
- keypress: handler
- keyup: handler
-
Mode.updateBadge() if @badge
Mode.modes.push @
@logStack() if @debug
- # handlerStack.debugOn()
# End of Mode constructor.
push: (handlers) ->