Skip to content

Commit a277fa6

Browse files
author
Stephen Blott
committed
Revert 2c7bebb
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 2c7bebb, you can never hide the key bindings (I think). All in all, this just seems too risky.
1 parent b27bd39 commit a277fa6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

content_scripts/vimium_frontend.coffee

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,15 @@ onKeydown = (event) ->
398398
keyChar = "<" + keyChar + ">"
399399

400400
if (isInsertMode() && KeyboardUtils.isEscape(event))
401-
if isEditable(event.srcElement) or isEmbed(event.srcElement)
401+
# Note that we can't programmatically blur out of Flash embeds from Javascript.
402+
if (!isEmbed(event.srcElement))
402403
# Remove focus so the user can't just get himself back into insert mode by typing in the same input
403404
# box.
404-
event.srcElement.blur()
405-
exitInsertMode()
406-
DomUtils.suppressEvent event
407-
handledKeydownEvents.push event
405+
if (isEditable(event.srcElement))
406+
event.srcElement.blur()
407+
exitInsertMode()
408+
DomUtils.suppressEvent event
409+
handledKeydownEvents.push event
408410

409411
else if (findMode)
410412
if (KeyboardUtils.isEscape(event))

0 commit comments

Comments
 (0)