-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
FileDragging Extension is always on even without allowed files types #966
Comments
got a PR open here, seem to work. #965 |
@goldensunliu there was a discussion about this in #876 as well. I'll try to provide some more details here though. So there are a few different things that have contributed to the current state of the code:
Since the ImageDragging Extension has been replaced with the FileDragging Extension and we need to remain backwards compatible, the current situation is a bit confusing. What makes it more confusing is that people can still provide their own custom ImageDragging extension, and if they do, we need to not break that behavior. The result:
Again, the reason for all this complexity is for backwards compatibility. In 5.0.0, the editor ALWAYS prevented any drag and drop actions, and the So, until 6.0.0, we unfortunately can't change this behavior. However, if you just want the editor to stop preventing drag & drop events, you can just provide a dummy ImageDragging extension which does nothing (as shown in #876): var editor = new MediumEditor('.editor', {
extensions: {
'imageDragging': {}
}
}); Let me know if this allows you to work around your issue. |
Thank sounds good for now! I will file a little PR to include a little explanation in the doc |
http://codepen.io/poda/pen/XXoKeE
in this example, we added
imageDragging
to befalse
which causes theallowedTypes
to be empty for the file dragging extension. No file can be dragged onto the editting area, however the dragNdrop events are still captured and related styles are being applied.This is especially problematic, when you want its parent to handle DragNDrop events.
The text was updated successfully, but these errors were encountered: