-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Drop zone provider: option to avoid wrapper element #27079
Conversation
Size Change: +79 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
39074a6
to
0e282eb
Compare
0e282eb
to
84a9569
Compare
fc97655
to
ed23aec
Compare
Hey @ellatrix - this PR seems to have caused some regressions about The problem is that when you have opened the |
I tried reverting this PR (had to change two lines manually, but that was quite straight-forward), but the problem still seems to persist for me 😕 (Experimental PR here: #29516) |
Weird 🤔 - git bisected in a wrong way :) ? I think @ellatrix will have better input for this... This line here is the one that enables both drop zones to be active, even if they are not visible. |
Looking at this today |
I'm not sure how drag and drop into the media library and content are related? |
Description
Currently the drop zone provider has two purposes:
The element is not strictly necessary, so the latter purpose could be isolated behaviour in a hook, while the former could be purely a context provider.
Why? While it's always good to separate pieces of functionality and remove unnecessary div wrappers, this separation makes it also easier to implement iframing the editor content. With the drop behaviour separated, we can call it within the iframe on the body element.
I marked the new provider and hook unstable for now. I have some more thoughts on how we could potentially avoid the context and behaviour hook altogether if we manage to built it into the drop zones themselves. This requires some time to explore though.
How has this been tested?
Screenshots
Types of changes
Checklist: