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.
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.
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:
Unfortunately, Lexical only seems to expose the
DRAGOVER_COMMAND
, and does not have adragenter
. I believe both are required to eliminate the effect, unless I am mistaken.