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

Prevent dropping of external files onto editor #537

Merged
merged 1 commit into from Nov 15, 2022

Conversation

dariusk
Copy link
Contributor

@dariusk dariusk commented Mar 3, 2022

We now detect whether a file is being dropped by a user (by checking event.dataTransfer.files.length) and prevent the remaining drop behavior if this is the case. Otherwise, drop happens like normal (so a user can still drop text into the editor, or even an image that has been uploaded already via normal means and rendered in the editor).

This should address this issue.


  • I have signed the CLA

We now detect whether a file is being dropped by a user (by checking `event.dataTransfer.files.length`) and prevent the remaining drop behavior if this is the case. Otherwise, drop happens like normal (so a user can still drop text into the editor, or even an image that has been uploaded already via normal means and rendered in the editor).
@thebaer thebaer changed the base branch from develop to hotfix-0.13.2 March 3, 2022 20:01
@thebaer thebaer changed the base branch from hotfix-0.13.2 to develop March 3, 2022 20:03
Copy link
Member

@thebaer thebaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works perfectly -- and good catch keeping the support for dropping in text. Thanks, @dariusk!

@thebaer thebaer added this to the 1.0 milestone Nov 15, 2022
@thebaer thebaer merged commit 4c1678f into writefreely:develop Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants