mdx-editor / mdx-editor/editor
[BUG] Remove dropEffect/effectAllowed when drag is not permitted
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
Note: this is related to PR #549, which is currently under review.
When no imageUploadHandler is provided, users are blocked from dropping file system images into the document. However, the UX still includes the (+) dropEffect. The solution should look something like:
if (event.dataTransfer) {
event.dataTransfer.dropEffect = "none"
event.dataTransfer.effectAllowed = "none"
}
Unfortunately, Lexical only seems to expose the DRAGOVER_COMMAND, and does not have a dragenter. I believe both are required to eliminate the effect, unless I am mistaken.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the DRAGOVER_COMMAND handling and the imageUploadHandler condition, then compare the related PR #549 under review. Verify how dragenter and dragover are exposed and make the completed behavior clear: when image uploads are unavailable, the drop UI should not advertise or permit dropping file-system images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100