Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Remove dropEffect/effectAllowed when drag is not permitted #551

Open
rissois opened this issue Jul 23, 2024 · 1 comment
Open

[BUG] Remove dropEffect/effectAllowed when drag is not permitted #551

rissois opened this issue Jul 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rissois
Copy link
Contributor

rissois commented Jul 23, 2024

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.

@rissois rissois added the bug Something isn't working label Jul 23, 2024
@petyosi
Copy link
Contributor

petyosi commented Jul 24, 2024

That would be a nice enhancement. If you have the capacity, you can open a PR in the Lexical project, from my experience they are quite welcoming to such changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants