diff --git a/css/includes/components/_kb.scss b/css/includes/components/_kb.scss index 7588bf0ef45..2ddf78f92d2 100644 --- a/css/includes/components/_kb.scss +++ b/css/includes/components/_kb.scss @@ -78,15 +78,9 @@ } .kb-article { + position: relative; max-height: calc(100vh - 150px); overflow: auto; - - // Allow bubble menu to overflow when editor is active - &:has(.is-editing) { - overflow: visible; - max-height: none; - } - transition: width 0.35s ease-in-out; } diff --git a/js/modules/KnowbaseEditor.js b/js/modules/KnowbaseEditor.js index 149cfc2d608..65e754376bf 100644 --- a/js/modules/KnowbaseEditor.js +++ b/js/modules/KnowbaseEditor.js @@ -126,12 +126,11 @@ class KnowbaseEditor { }), TiptapBubbleMenu.configure({ element: this.#bubbleMenuElement, - appendTo: () => document.body, + appendTo: () => this.#element.closest('.kb-article') ?? document.body, shouldShow: ({ editor, state }) => !state.selection.empty && !editor.isActive('image'), options: { placement: 'top', offset: 8, - shift: {boundary: this.#element}, }, }), TiptapTable.configure({