feat: implement math rendering in HTML component and enhance drag handle visibility logic
This commit is contained in:
@@ -184,10 +184,9 @@ export function DragHandlePlugin(options: GlobalDragHandleOptions & { pluginKey:
|
||||
|
||||
function hideHandleOnEditorOut(event: MouseEvent) {
|
||||
if (event.target instanceof Element) {
|
||||
// Check if the relatedTarget class is still inside the editor
|
||||
// Keep handle visible while cursor moves into editor descendants or handle children.
|
||||
const relatedTarget = event.relatedTarget as HTMLElement;
|
||||
const isInsideEditor =
|
||||
relatedTarget?.classList.contains('tiptap') || relatedTarget?.classList.contains('drag-handle');
|
||||
const isInsideEditor = !!relatedTarget?.closest('.tiptap, .drag-handle');
|
||||
|
||||
if (isInsideEditor) return;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
pluginKey="link-bubble-menu"
|
||||
{shouldShow}
|
||||
class={cn(
|
||||
'edra-bubble-menu ui:bg-popover ui:flex ui:h-fit ui:w-fit ui:items-center ui:rounded-lg ui:p-0.5',
|
||||
'edra-bubble-menu ui:bg-popover ui:flex ui:h-fit ui:w-fit ui:items-center ui:rounded-lg ui:p-0.5 ui:shadow-lg',
|
||||
className
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user