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

Media modal content disappears when the 782 pixels media query kicks in #23064

Open
afercia opened this issue Jun 10, 2020 · 1 comment
Open
Labels
[Feature] Media Anything that impacts the experience of managing media Needs Technical Feedback Needs testing from a developer perspective. [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Jun 10, 2020

Describe the bug

When the media modal is open in the block editor and the viewport size changes (due for example to a device orientation change or just because the user shrinks the browser window) triggering the 782 pixels media query, any content in the media modal disappears. It is actually removed from the DOM.

This results in the complete inability to use the media modal. Users need to understand they have to close it and reopen it again or refresh the page, which is far from ideal.

Note: I seem to remember there was a similar issue in the past but I couldn't find it. Note also that this bug seems to happen when editing an already inserted media (e.g. replacing the image of an Image block). Doesn't seem to happen when inserting a new media.

To reproduce
I made a GIF:

gutenberg media modal content disappears

The bug happens also when starting from a small viewport width and then the viewport changes to a bigger width.

Expected behavior
Content to not be removed from the media modal.

Editor version (please complete the following information):

  • WordPress version: 5.4
  • default block editor and Gutenberg plugin 8.3.0-rc.1
@afercia afercia added [Type] Bug An existing feature does not function as intended [Feature] Media Anything that impacts the experience of managing media labels Jun 10, 2020
@kathrynwp
Copy link

I am able to reproduce this with:

WordPress 6.0.1
Gutenberg 13.7.3 active or inactive
No other plugins active

I was not able to reproduce by first making the viewport smaller than 782px and then opening the media modal; if opening the media modal at the small size, the media library appears normally.

@kathrynwp kathrynwp added the Needs Technical Feedback Needs testing from a developer perspective. label Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media Needs Technical Feedback Needs testing from a developer perspective. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants