Skip to content

Commit e22a451

Browse files
committed
[contenteditable input] Don't preventDefault keypress events when charCode==0
Closes #4589
1 parent 0100ef3 commit e22a451

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/input/ContentEditableInput.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ export default class ContentEditableInput {
325325
}
326326

327327
onKeyPress(e) {
328+
if (e.charCode == 0) return
328329
e.preventDefault()
329330
if (!this.cm.isReadOnly())
330331
operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0)

0 commit comments

Comments
 (0)