-
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
Cover block MediaPlaceholder interferes with block inserter drag and drop #66422
Comments
@ndiego @colorful-tones I believe this affects Zoom Out so we should gauge it's impact there and decide whether we need to try and resolve during this cycle. |
If we do include it in 6.7, we should ideally get it into RC2 so there is a bit of time for folks to test the fix. Can a fix be implemented in time? If so, I'm all for it. |
Looking into this and documenting findings on this comment as I go...
SuggestionWe could conditionalise the However it looks like browser deliberately disable the ability to access the data about the type of "thing" being dragged until it's actually dropped. This is a security feature so I don't think there's a way to tell what got dragged unless we move that to state and track manually 🤔 Moreover, as the Cover block doesn't accept blocks but only images, we should conditionalise the label to be relevant only to images.
|
@kevin940726 @ndiego @colorful-tones I can't see this being resolved in time for RC3 tomorrow. I'm minded to punt to 6.8 cycle. We should fix but there are lots of elements to consider here which I wouldn't feel comfortable rushing into 6.7. |
Agreed. |
I'd expect the following:
This below should not happen. Instead it should behave like dragging any other blocks into any other groups. CleanShot.2024-11-05.at.11.44.40.mp4 |
Agreed. It's something to fix. |
Looks like this was caused by #49673 adding a non-optional One way to fix this is by creating an additional dataTransfer type that is exclusive to media, and changing the media placeholder drop handler to handle that one type only. I'll have a play with this and see if it's viable! |
Description
The cover block's
MediaPlaceholder
seems to prevent dragging and dropping blocks or patterns from the block inserter.Additionally, it seems to interpret these blocks/patterns as files and shows incorrect messaging in the UI.
This issue may also happen for other blocks that use
MediaPlaceholder
but it's hard to say as I haven't tested widely.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Kapture.2024-10-24.at.16.34.54.mp4
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: