Skip to content

Commit

Permalink
Merge pull request #6 from mono0x/disable-actions-in-contenteditable
Browse files Browse the repository at this point in the history
Disable actions in elements with contenteditable
  • Loading branch information
Shogo Ohta committed Apr 30, 2013
2 parents c8b34e5 + 4b8cced commit 5002a42
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Keyconfig/js/chrome_keyconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 5002a42

Please sign in to comment.