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