Merge branch 'fix-key-events' into new

This commit is contained in:
2022-07-09 15:24:19 +03:00
16 changed files with 34 additions and 25 deletions

View File

@@ -1792,8 +1792,11 @@ function src_autoLink (text, options) {
this.body = ''
},
onKeyUp (e) {
const keysToIgnore = ['Shift', 'Meta', 'Control', 'Alt', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']
if (keysToIgnore.includes(e.key)) return
let caretPosition = this.getCaretPos()
if (e.keyCode === 13) { // Enter key
if (e.key === 'Enter') {
caretPosition++
}
this.body = e.target.innerText

File diff suppressed because one or more lines are too long

View File

@@ -1801,8 +1801,11 @@ function src_autoLink (text, options) {
this.body = ''
},
onKeyUp (e) {
const keysToIgnore = ['Shift', 'Meta', 'Control', 'Alt', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']
if (keysToIgnore.includes(e.key)) return
let caretPosition = this.getCaretPos()
if (e.keyCode === 13) { // Enter key
if (e.key === 'Enter') {
caretPosition++
}
this.body = e.target.innerText

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long