aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2014-10-29 13:48:05 +0000
committerStephen Blott2014-10-29 13:51:38 +0000
commita277fa6332f3aa3c0aa5f2c541f539fb1569c6b9 (patch)
tree2c5da919ec74c306cad67670cadadb2963e91bc4
parentb27bd390d67e11bba09282970f99738499318714 (diff)
downloadvimium-a277fa6332f3aa3c0aa5f2c541f539fb1569c6b9.tar.bz2
Revert 2c7bebb5f2c873850c2b2d82013cab4eb3d4913c
On reflection, this seems too dangerous: - Somebody excluded flash for a reason, and without knowing that reason, it seems dangerous. - Imagine a flash game with key bindings. Perhaps it uses ? to show the key bindings, and ESC to hide them again. With 2c7bebb5f2c873850c2b2d82013cab4eb3d4913c, you can never hide the key bindings (I think). All in all, this just seems too risky.
-rw-r--r--content_scripts/vimium_frontend.coffee12
1 files changed, 7 insertions, 5 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 9e33b910..4f7becba 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -398,13 +398,15 @@ onKeydown = (event) ->
keyChar = "<" + keyChar + ">"
if (isInsertMode() && KeyboardUtils.isEscape(event))
- if isEditable(event.srcElement) or isEmbed(event.srcElement)
+ # Note that we can't programmatically blur out of Flash embeds from Javascript.
+ if (!isEmbed(event.srcElement))
# Remove focus so the user can't just get himself back into insert mode by typing in the same input
# box.
- event.srcElement.blur()
- exitInsertMode()
- DomUtils.suppressEvent event
- handledKeydownEvents.push event
+ if (isEditable(event.srcElement))
+ event.srcElement.blur()
+ exitInsertMode()
+ DomUtils.suppressEvent event
+ handledKeydownEvents.push event
else if (findMode)
if (KeyboardUtils.isEscape(event))