Fix #1839: Prevent keypress events on user input elements
This commit is contained in:
@@ -521,6 +521,9 @@ function onPaste (e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onKeydown (e) {
|
function onKeydown (e) {
|
||||||
|
// prevent event fire on user input elements
|
||||||
|
if (editableHtmlTags.has(e.target.tagName.toLowerCase())) return
|
||||||
|
|
||||||
const key = e.key
|
const key = e.key
|
||||||
|
|
||||||
if (key === 'ArrowLeft') {
|
if (key === 'ArrowLeft') {
|
||||||
|
|||||||
Reference in New Issue
Block a user