From 11fe107f95dab3a584b7eb4b14a67910d16476be Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 18 Nov 2014 08:52:24 +0000 Subject: Do not handle keystrokes for contentEditable. --- content_scripts/vimium_frontend.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 118f985e..4df24da4 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -560,7 +560,12 @@ exitInsertMode = (target) -> insertModeLock = null HUD.hide() -isInsertMode = -> insertModeLock != null +isInsertMode = -> + # In addition to checking insertModeLock, we also need to check whether the active element is + # contentEditable because some sites (e.g. inbox.google.com) change the contentEditable attribute on the + # fly; see #1245. + insertModeLock != null or + (document.activeElement and document.activeElement.isContentEditable) # should be called whenever rawQuery is modified. updateFindModeQuery = -> -- cgit v1.2.3