diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-12 20:42:55 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-12 20:42:55 +0900 |
commit | 10beccfab2361e97a25628e017662dee70c079a9 (patch) | |
tree | 75e1f989d13585b3f3a8135d2f648e7f1598c470 /src/content | |
parent | f2a42c50d9c1e9661a9c70eeb38af043a8bd2e01 (diff) |
ignore events from contenteditable
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/components/content-input.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/content/components/content-input.js b/src/content/components/content-input.js index 0ba4bcb..3e70bbb 100644 --- a/src/content/components/content-input.js +++ b/src/content/components/content-input.js @@ -63,6 +63,10 @@ export default class ContentInputComponent { fromInput(e) { return e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || - e.target instanceof HTMLSelectElement; + e.target instanceof HTMLSelectElement || + e.target instanceof HTMLElement && + e.target.hasAttribute('contenteditable') && ( + e.target.getAttribute('contenteditable').toLowerCase() === 'true' || + e.target.getAttribute('contenteditable').toLowerCase() === ''); } } |