Merge pull request #1840 from subins2000/fix-1839-no-keyevents-on-user-input

Fix #1839: Prevent keypress events on user input elements
This commit is contained in:
Julen Garcia Leunda 2020-07-30 18:31:22 +02:00 committed by GitHub
commit 60b4365a76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -521,6 +521,9 @@ function onPaste (e) {
}
function onKeydown (e) {
// prevent event fire on user input elements
if (editableHtmlTags.has(e.target.tagName.toLowerCase())) return
const key = e.key
if (key === 'ArrowLeft') {