From 4b8cceddd0af9a3278196c47a7c9fff3fee9ceac Mon Sep 17 00:00:00 2001 From: mono Date: Tue, 30 Apr 2013 11:10:53 +0900 Subject: [PATCH] Disable actions in elements with contenteditable Vi like actions are not supported yet. --- Keyconfig/js/chrome_keyconfig.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Keyconfig/js/chrome_keyconfig.js b/Keyconfig/js/chrome_keyconfig.js index 1e6f2a3..e45823b 100644 --- a/Keyconfig/js/chrome_keyconfig.js +++ b/Keyconfig/js/chrome_keyconfig.js @@ -1225,10 +1225,13 @@ } var target = evt.target; var isTextedit = false; - if ('selectionStart' in target && target.disabled !== true) { + if (('selectionStart' in target || target.isContentEditable) && target.disabled !== true) { try { var s = target.selectionStart; if (KeyConfig.config.chrome_vim) { + if (s === undefined && target.isContentEditable) { + return; + } if (KeyConfig.vimActionSet === 'vim_normal_actions') { evt.preventDefault(); }