diff --git a/src/shared/components/BlockEditor/inline/Toolbar.client.js b/src/shared/components/BlockEditor/inline/Toolbar.client.js index c85f61e..678cbb6 100644 --- a/src/shared/components/BlockEditor/inline/Toolbar.client.js +++ b/src/shared/components/BlockEditor/inline/Toolbar.client.js @@ -27,7 +27,7 @@ export default function InlineToolbar({ rect, activeMarks, onToggleMark, onPinCh const [pos, setPos] = useState({ top: 0, left: 0, flipped: false }); const [popover, setPopover] = useState(null); // 'color' | 'highlight' | 'link' | null const [linkUrl, setLinkUrl] = useState(''); - const [linkNewTab, setLinkNewTab] = useState(true); + const [linkNewTab, setLinkNewTab] = useState(false); useEffect(() => { onPinChange?.(popover !== null); @@ -91,7 +91,7 @@ export default function InlineToolbar({ rect, activeMarks, onToggleMark, onPinCh function openLinkPopover() { const link = activeMarks.find(m => m.type === 'link'); setLinkUrl(link?.href ?? ''); - setLinkNewTab(link ? !!link.newTab : true); + setLinkNewTab(link ? !!link.newTab : false); setPopover(p => (p === 'link' ? null : 'link')); } @@ -101,13 +101,13 @@ export default function InlineToolbar({ rect, activeMarks, onToggleMark, onPinCh data-inline-toolbar className="fixed z-50 flex items-center gap-0.5 rounded-lg border border-neutral-200 dark:border-neutral-700 bg-white dark:bg-neutral-900 shadow-md px-1 py-1" style={{ top: pos.top, left: pos.left }} - onMouseDown={(e) => e.preventDefault()} > {SIMPLE_BUTTONS.map(btn => (