CodeEdit
CodeEdit copied to clipboard
🐞 Prevent dropping sidebar dock Icon into editor
Description
The icon of the navigator sidebar toolbar is currently droppable as a text. This should NOT happen.
https://user-images.githubusercontent.com/36816148/170332390-84fc5f76-9fe2-4192-84a6-f3818bdb6130.mp4
To Reproduce
- Drag the icon out from the navigator sidebar toolbar.
- Move your cursor (keep dragging) to some text editor, then drop it.
Expected behavior
While the cursor is dragging something out, it should not be able to drop anything, and it should not have a "plus" cursor (the cursor indicating that I can copy some text to here).
Version information
CodeEdit: 1.0 (1) Commit: 8f3c3ebb455096933a19a98813bb6089046b6689 MacOS: 12.3 (21E230) Xcode: 13.3.1 (13E500a)
Additional context
The potential cause is the onDrag and onDrop APIs, which is using the uniform type (text), so it is droppable to anywhere accepting the uniform type.