diff --git a/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx b/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx index 3881e0daa7..cac609ff86 100644 --- a/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx +++ b/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx @@ -96,6 +96,15 @@ const Toolbar = memo(function Toolbar() { } }, [buildOverflow, languageName, resizeRef, visual]) + const insideTable = document.activeElement?.closest( + '.table-generator-help-modal,.table-generator' + ) + useEffect(() => { + if (resizeRef.current) { + buildOverflow(resizeRef.current.element) + } + }, [buildOverflow, insideTable, resizeRef]) + const toggleToolbar = useCallback(() => { setCollapsed(value => !value) }, []) @@ -107,27 +116,31 @@ const Toolbar = memo(function Toolbar() { return (