Skip to content

Commit 11e31e7

Browse files
committed
ContentEditable elements are InputElements
In onKeyUpOrDown, we check to see whether we should ignore a particular key or not. One of the checks is whether an input element is focused. 'inInputElemFocused' checks whether the focused element is an instance of Input or TextArea or Object or Embed. However, contentEditable divs should be included in the check because some websites like facebook use content editable elements instead of other input elements for better styling.
1 parent ccdaab6 commit 11e31e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/content/events.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,8 @@ const Events = Module("events", {
11251125
return ((elem instanceof HTMLInputElement && !/image/.test(elem.type)) ||
11261126
elem instanceof HTMLTextAreaElement ||
11271127
elem instanceof HTMLObjectElement ||
1128-
elem instanceof HTMLEmbedElement);
1128+
elem instanceof HTMLEmbedElement ||
1129+
(elem && elem.contentEditable === "true"));
11291130
}
11301131
}, {
11311132
commands: function () {

0 commit comments

Comments
 (0)