Skip to content

Commit

Permalink
fix: Avoid focus trap causing troubles with tab indent of lists
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Aug 29, 2023
1 parent f61f612 commit fddf0a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,16 @@ export default {

onFocus() {
this.emit('focus')

// Make sure that the focus trap doesn't catch tab keys while being in the contenteditable
window._nc_focus_trap?.[0]?.pause()
},
onBlur() {
this.emit('blur')

// Hand back focus to the previous trap
window._nc_focus_trap?.[0]?.unpause()
this.$el.focus()
},

onAddImageNode() {
Expand Down

0 comments on commit fddf0a0

Please sign in to comment.