Skip to content

Commit

Permalink
Prevent dragging of treeview row placeholder item (#5899)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreSi authored Nov 13, 2023
1 parent 9e176d9 commit 547f1e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion newIDE/app/src/UI/TreeView/TreeViewRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ const TreeViewRow = <Item: ItemBaseAttributes>(props: Props<Item>) => {
return {};
}}
canDrag={() =>
// Prevent dragging of root folder.
// Prevent dragging of root folder or placeholder.
!node.item.isRoot &&
!node.item.isPlaceholder &&
// Prevent dragging of item whose name is edited, allowing to select text with click and drag on text.
renamedItemId !== node.id
}
Expand Down

0 comments on commit 547f1e4

Please sign in to comment.