Phenomenon
When trying to drag and drop files into a contenteditable element, the File API may not work as expected. File drop events may not fire, or file content may not be accessible.
Reproduction example
- Create a contenteditable div.
- Try to drag a file from the file system into the contenteditable.
- Listen for drop events and try to read file content.
- Observe whether files can be dropped and accessed.
Observed behavior
- In Safari on macOS, file drag and drop may not work in contenteditable.
- Drop events may not fire for files.
- File content may not be accessible.
- The default paste behavior may interfere.
Expected behavior
- File drag and drop should work in contenteditable.
- Drop events should fire correctly.
- File content should be accessible via File API.