Skip to content

Interface Skeleton: Limit the editor width to prevent some blocks to grow infinitely wide #27622

Closed

Description

@Copons

Describe the bug

With #25884, some blocks were somehow able to exceed the editor boundaries and, when set to full width, gain a width of literally millions of pixels, making the editor unusable.

In #26552 we added a max-width: 100% to .interface-interface-skeleton__editor which seemed to fix the issue.

The fix was then removed in #26944 because not compatible with IE11.

So, again some blocks can become infinitely wide.
Empirically, this seems to happen with slideshow blocks (see for example the Slideshow block included in Jetpack).

To reproduce

Note: I'll mention Jetpack in the test steps because it's the one plugin I'm familiar with.
Users have reported that the issue affects other slideshow blocks, but they might not necessarily be openly available for testing.
Feel free to comment with details on how to test with other blocks, and I'll be happy to update these steps to include them as well.

Steps to reproduce the behavior:

  1. Install and activate Jetpack.
  2. Open the post editor and insert a Slideshow block. Add some images to it.
  3. Open the browser's dev tools, search for .interface-interface-skeleton__editor and disable the max-width: 100% rule. That is provided by Jetpack exactly to fix this issue.
  4. Set the Slideshow block at full width.
  5. The block is now millions of pixel wide, basically breaking the editor.

Expected behavior

The slideshow block should have been as wide as the editor.

Screenshots

Normal Width Full Width Full Width (Highlighted)
Screenshot 2020-12-09 at 18 00 24 Screenshot 2020-12-09 at 18 00 35 Screenshot 2020-12-09 at 18 00 55

Editor version (please complete the following information):

  • WordPress version: 5.6 (tested up to 5.7-alpha-49774)
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Both gutenberg plugin and default.
  • If the Gutenberg plugin is installed, which version is it? 9.5.1

Desktop (please complete the following information):

  • OS: MacOS Big Sur 11.0.1
  • Browser: Chrome
  • Version: 87

Additional context

Given the original fix was removed because not compatible with IE11, let's make sure to test the new fix on IE11 as well!

Activity

  1. added
    [Type] Bug
    General Interface
    Browser Issues
    [Package] Interface
    on Dec 9, 2020
  2. added
    [Type] Regression
    CSS Styling
    on Dec 10, 2020
  3. youknowriad commented on Dec 10, 2020

    @youknowriad
    Contributor

    cc @jasmussen in case you have an idea for a potential fix here.

  4. jasmussen commented on Dec 10, 2020

    @jasmussen
    Contributor

    Yep, thanks, we are exploring a solution in #26944 (comment).

  5. ambienthack commented on Dec 10, 2020

    @ambienthack
    Contributor

    @Copons can you please specify what version of jetpack you are using? Also, are you using TT1 or TT1-blocks (not sure if it matters)?
    I have problems reproducing it. I used latest published jetpack version.
    I've tried it with latest dev version of wp and gutenberg. As well as with latest published versions of wp and gutenberg.
    On chrome 87 windows and mac.

    Screenshot_3

  6. ambienthack commented on Dec 10, 2020

    @ambienthack
    Contributor

    Figured it out, max-width:100% is added by jetpack now.

  7. Copons commented on Dec 10, 2020

    @Copons
    ContributorAuthor

    @ambienthack the colors are just a different admin color scheme (you can change it in Users > Profile) 🙂

    Anyway you're right: Jetpack includes the fix.

    When I tested it before opening the issue, I think I was using an old Jetpack master that didn't have the fix.
    I've pulled now (and also tested on the stable 9.2 version), and the fix is always included.

    I'll update the repro steps to mention that we need to disable the max-width rule in the browser dev tools.

  8. added
    [Status] In Progress
    on Dec 10, 2020
  9. ambienthack commented on Dec 11, 2020

    @ambienthack
    Contributor

    Created a PR #27646.
    It fixes the regression (by putting max-width:100% back), and doesn't conflict with the previous IE11-related fix. But I was not able to test Slideshow block on IE11 because it seems Slideshow is not supported in IE11. Potentially this PR may not work for Slideshow on IE11 (were it available on IE11).

    Screenshot of slideshow block on IE11 (the block on the same wp installation works in other browsers)
    Screenshot_8

  10. removed their assignment
    on Dec 11, 2020
  11. ambienthack commented on Dec 12, 2020

    @ambienthack
    Contributor

    Edit: added screenshot
    I've closed the PR, because max-width:100% doesn't fix it in Full Site Editing mode (although, it makes the situation better).

    101968079-61172100-3c2e-11eb-8fcd-ac0f7537be26

  12. ambienthack commented on Dec 12, 2020

    @ambienthack
    Contributor

    I made a small research and maybe overflow: hidden on .interface-interface-skeleton__editor can fix the problem.

  13. ambienthack commented on Dec 12, 2020

    @ambienthack
    Contributor

    Created another PR #27695

  14. webprom commented on Dec 12, 2020

    @webprom

    100% max-width works well. ie11 is deprecated anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Browser IssuesCSS StylingGeneral Interface[Package] Interface[Status] In Progress[Type] Bug[Type] Regression

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions