mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-03-24 00:16:39 +01:00
Fix:Using arrow keys when editing podcast description #1826
This commit is contained in:
parent
fde07d26e5
commit
d714ef37d9
@ -213,7 +213,9 @@ export default {
|
|||||||
// Reload HTML content
|
// Reload HTML content
|
||||||
this.$refs.trix.editor.loadHTML(newContent)
|
this.$refs.trix.editor.loadHTML(newContent)
|
||||||
// Move cursor to end of new content updated
|
// Move cursor to end of new content updated
|
||||||
|
if (this.autofocus) {
|
||||||
this.$refs.trix.editor.setSelectedRange(this.getContentEndPosition())
|
this.$refs.trix.editor.setSelectedRange(this.getContentEndPosition())
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getContentEndPosition() {
|
getContentEndPosition() {
|
||||||
return this.$refs.trix.editor.getDocument().toString().length - 1
|
return this.$refs.trix.editor.getDocument().toString().length - 1
|
||||||
|
@ -491,9 +491,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkActiveElementIsInput() {
|
checkActiveElementIsInput() {
|
||||||
var activeElement = document.activeElement
|
const activeElement = document.activeElement
|
||||||
var inputs = ['input', 'select', 'button', 'textarea']
|
const inputs = ['input', 'select', 'button', 'textarea', 'trix-editor']
|
||||||
return activeElement && inputs.indexOf(activeElement.tagName.toLowerCase()) !== -1
|
return activeElement && inputs.some((i) => i === activeElement.tagName.toLowerCase())
|
||||||
},
|
},
|
||||||
getHotkeyName(e) {
|
getHotkeyName(e) {
|
||||||
var keyCode = e.keyCode || e.which
|
var keyCode = e.keyCode || e.which
|
||||||
|
Loading…
Reference in New Issue
Block a user