diff --git a/src/components/Editor.vue b/src/components/Editor.vue
index 40b9690f161..6c2d4d6c165 100644
--- a/src/components/Editor.vue
+++ b/src/components/Editor.vue
@@ -637,16 +637,10 @@ 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() {
@@ -744,6 +738,15 @@ export default {
this.$editor.commands.insertContent('\t')
this.$editor.commands.focus()
event.preventDefault()
+ event.stopPropagation()
+ return
+ }
+
+ if (event.key === 'Tab') {
+ const possibleEditorTabCommand = this.$editor.can().sinkListItem() || this.$editor.can().liftListItem() || this.$editor.can().goToNextCell() || this.$editor.can().goToPreviousCell()
+ if (possibleEditorTabCommand) {
+ event.stopPropagation()
+ }
return
}
diff --git a/src/components/Editor/ContentContainer.vue b/src/components/Editor/ContentContainer.vue
index 9daf5e587e5..7cd40891399 100644
--- a/src/components/Editor/ContentContainer.vue
+++ b/src/components/Editor/ContentContainer.vue
@@ -30,8 +30,7 @@