From 94586418ffd92246551c26ff00f0d80b0e2289fa Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 5 Jan 2015 14:25:08 +0000 Subject: Modes; more minor tweeks. --- content_scripts/mode_find.coffee | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'content_scripts/mode_find.coffee') diff --git a/content_scripts/mode_find.coffee b/content_scripts/mode_find.coffee index 8b458770..0937c510 100644 --- a/content_scripts/mode_find.coffee +++ b/content_scripts/mode_find.coffee @@ -2,8 +2,8 @@ # When we use find mode, the selection/focus can end up in a focusable/editable element. In this situation, # PostFindMode handles two special cases: -# 1. Suppress InsertModeTrigger. This presents keyboard events from dropping us unintentionaly into insert -# mode. Here, this is achieved by inheriting PostFindMode from InsertModeBlocker. +# 1. Suppress InsertModeTrigger. This prevents keyboard events from dropping us unintentionaly into insert +# mode. Here, this is achieved by inheriting from InsertModeBlocker. # 2. If the very-next keystroke is Escape, then drop immediately into insert mode. # class PostFindMode extends InsertModeBlocker @@ -31,11 +31,11 @@ class PostFindMode extends InsertModeBlocker # Install various ways in which we can leave this mode. @push - DOMActive: (event) => handlerStack.alwaysContinueBubbling => @exit() - click: (event) => handlerStack.alwaysContinueBubbling => @exit() - focus: (event) => handlerStack.alwaysContinueBubbling => @exit() - blur: (event) => handlerStack.alwaysContinueBubbling => @exit() - keydown: (event) => handlerStack.alwaysContinueBubbling => @exit() if document.activeElement != element + DOMActive: (event) => @alwaysContinueBubbling => @exit() + click: (event) => @alwaysContinueBubbling => @exit() + focus: (event) => @alwaysContinueBubbling => @exit() + blur: (event) => @alwaysContinueBubbling => @exit() + keydown: (event) => @alwaysContinueBubbling => @exit() if document.activeElement != element root = exports ? window root.PostFindMode = PostFindMode -- cgit v1.2.3