Skip to content

BlockTypes pattern preview scroll issues #49289

Closed

Description

@richtabor

Description

The "Patterns" popover is acting up when attempting to scroll available patterns.

Step-by-step reproduction instructions

  1. Add a new page.
  2. Add a core/query-loop block
  3. Select the block icon.
  4. Select the "Patterns" menu item.
  5. Try scrolling the popover to see other patterns.

Screenshots, screen recording, code snippet

CleanShot.2023-03-22.at.17.16.13.mp4

Environment info

  • WordPress 6.2-RC3
  • With, and without Gutenberg

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

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    [Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced
    on Mar 22, 2023
  2. annezazu commented on Aug 29, 2023

    @annezazu
    Contributor

    Noting that I can replicate with 6.3.1:

    6.3.1.patterns.mov
  3. talldan commented on Oct 4, 2023

    @talldan
    Contributor

    @annezazu Your video doesn't seem the same as @richtabor's. In Rich's the pattern popover becomes completely detached from the toolbar, whereas in yours it looks like it behaves correctly (stays anchored to the toolbar).

    I can't reproduce this now, it seems solved.

  4. t-hamano commented on Oct 4, 2023

    @t-hamano
    Contributor

    The situation has changed a bit from what was originally reported, but the problem still reproduces in my environment.

    • The scrollbar appears ((probably only on Windows)) in the editor canvas when opening pattern popover in the query loop block
    • When I scroll in the preview popover, the popover jumps momentarily and returns to its original position.

    My guess is that the preview popover height is overflowing internally, and the scrolling operation inside the popover may actually be scrolling the editor canvas.

    81e26afcafc73e8df5c05b9c3f62a844.mp4
  5. t-hamano commented on Oct 4, 2023

    @t-hamano
    Contributor

    I've probably found the cause, so I'd like to submit a PR soon.

  6. talldan commented on Oct 4, 2023

    @talldan
    Contributor

    Maybe it's browser specific, that doesn't happen for me.

  7. t-hamano commented on Oct 4, 2023

    @t-hamano
    Contributor

    @talldan Thank you for teaching me that. In your environment, are you able to scroll inside the pattern popover as expected?

  8. talldan commented on Oct 5, 2023

    @talldan
    Contributor

    @t-hamano Ok, I think I see it now, thanks for helping me understand it, I didn't quite realise there were multiple patterns in the popover 👍

    It seems like the css overflow rules are wrong, so the popover can't be scrolled, and that causes some weirdness with the popover positioning.

    I tried a fix here - Fix scrollbars on pattern transforms

  9. moved this from Todo to Done in Patternson Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[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