Skip to content

Extra scrollbar appears while editing patterns/template parts whenever there are notices #62911

@talldan

Description

@talldan

Description

When editing patterns any notices result in a second scrollbar appearing.

The bug happens because the notices push the editor canvas area off-screen, which triggers a scrollbar.

I'm personally unsure of the right fix. For the normal post editing experience, the editor canvas shrinks when there's a notice, so perhaps the focus mode should do the same?

Step-by-step reproduction instructions

  1. Edit a pattern (post or site editor)
  2. Add enough content so that a scrollbar appears
  3. Run this JavaScript snippet in your browser console:
wp.data.dispatch( 'core/notices' ).createInfoNotice( 'Notice' );

Observe two scrollbars

Screenshots, screen recording, code snippet

Screenshot 2024-06-27 at 4 21 31 pm

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    General InterfaceParts of the UI which don't fall neatly under other labels.Needs Design FeedbackNeeds general design feedback.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions