fix: restore drag-and-drop + onPointerDown stopPropagation on button — both work on all resolutions

This commit is contained in:
Agent Zero
2026-07-27 16:57:48 +02:00
parent 4c951c9c61
commit 4a3e4cd0a4
@@ -153,6 +153,11 @@ function FolderTreeItem({
return ( return (
<div> <div>
<div <div
draggable
onDragStart={(e) => {
e.dataTransfer.setData('text/folder-id', node.id);
e.dataTransfer.effectAllowed = 'move';
}}
onDragOver={(e) => onDragOver(e, node.id)} onDragOver={(e) => onDragOver(e, node.id)}
onDragLeave={() => onDragLeave(node.id)} onDragLeave={() => onDragLeave(node.id)}
onDrop={(e) => onDrop(e, node.id)} onDrop={(e) => onDrop(e, node.id)}
@@ -179,6 +184,8 @@ function FolderTreeItem({
)} )}
<button <button
type="button" type="button"
draggable={false}
onPointerDown={(e) => { e.stopPropagation(); }}
onClick={(e) => { e.stopPropagation(); e.preventDefault(); onMoreClick(e, node.id); }} onClick={(e) => { e.stopPropagation(); e.preventDefault(); onMoreClick(e, node.id); }}
className="flex-shrink-0 text-secondary-400 hover:text-primary-600 p-1.5 rounded hover:bg-secondary-100 transition-colors touch-manipulation" className="flex-shrink-0 text-secondary-400 hover:text-primary-600 p-1.5 rounded hover:bg-secondary-100 transition-colors touch-manipulation"
title="Optionen" title="Optionen"