Phenomenon
When using the HTML5 Drag and Drop API with contenteditable elements, the behavior differs from standard elements. Dragging text within a contenteditable may not work as expected, and drop zones may not be recognized correctly.
Reproduction example
- Create a contenteditable div with draggable text inside.
- Try to drag text within the contenteditable.
- Try to drag text from outside into the contenteditable.
- Observe drag and drop event handling.
Observed behavior
- In Chrome on macOS, drag and drop behavior is inconsistent in contenteditable.
- Dragging text within contenteditable may not work.
- Drop events may not fire correctly.
- The default drag behavior may interfere with editing.
Expected behavior
- Drag and drop should work consistently in contenteditable.
- Events should fire correctly.
- Default behavior should not interfere with editing.