Isolate block drag handles from selection and editing
Quality / quality (ubuntu-latest) (push) Failing after 10m0s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
Clintchiz committed 2026-09-05 21:10:10 +05:30
1 parent 640dadaa75
commit 01c1aa567e
3 files changed
+15 -1

No files matched your search

+4
View File
@@ -22,6 +22,10 @@ export function mountBlockCanvas(root: HTMLElement, tree: BlockNode, options: Mo
handle.setAttribute("aria-label", `Move ${node.type}`);
handle.style.touchAction = "none";
handle.textContent = "⋮⋮";
// Clicks must not bubble into selection or inline-edit handlers.
// Pointer/keyboard sensor events remain available to the DnD backend.
for (const name of ["click", "dblclick"])
handle.addEventListener(name, event => { event.preventDefault(); event.stopPropagation(); });
element.prepend(handle);
cleanup.push(() => handle.remove());
}