Opened 11 years ago
Last modified 10 years ago
#12091 confirmed New Feature
Blocking ability to drop content in specific container — at Initial Version
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Part of: #11437.
Native drag and drop supports a dragenter event fired when mouse enters drop container. This very useful way to say where user can drop and were not. Though, there's no access to clipboard data at that point so it's impossible to react based on what's dragged.
We can do better inside editor because we'll store dragged content in a global, custom data transfer object. We just need to join all these pieces together.
Plan:
- On editable's and nested editable's dragenter we should fire editor#dragenter with a reference to container (editable) and our data transfer if exists for this drag.
- When editor#dragenter is cancelled the native dragenter should be prevented so user is visually notified that content is rejected.