mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-13 05:16:29 +02:00
Revert to Tiptap's native <BubbleMenu> component which has battle-tested focus management (preventHide, relatedTarget checks, mousedown capture). The custom useFloating + createPortal approach had unfixable focus/blur issues — portal DOM updates caused editor blur cycles, and reimplementing the plugin's focus logic was incomplete. Also simplify link clicking: clicks on links now always open them (both edit and readonly mode) instead of showing a preview card. Remove EditorLinkPreview component entirely. Changes: - bubble-menu.tsx: back to <BubbleMenu> from @tiptap/react/menus - content-editor.tsx: link click always opens, remove EditorLinkPreview - link-preview.tsx: remove EditorLinkPreview, keep ReadonlyLinkWrapper - shouldShowBubbleMenu: add .trim() to filter whitespace-only selections - package.json: restore @tiptap/extension-bubble-menu dependency Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>