Skip to content

LinkControl: screen jumps when you click on the search result to select the  #28373

@desaiuditd

Description

@desaiuditd

Description

When adding a link in the paragraph block, if the paragraph is long and does not fit in the current viewport, and if the user clicks on the search result to add the link, the screen jumps. It's a little annoying experience.

Step-by-step reproduction instructions

  • Create a new post in Gutenberg block editor.
  • Add a paragraph block and adds a very long text in one single paragraph block such that the paragraph block length goes beyong the viewport.
  • Press CMD + K or click on Link format icon from the block toolbar to add the link.
  • Type some search keywords.
  • Click on any of the search result.
  • Observe the screen jump after you click.

Expected behaviour

The screen should not jump at the top of the paragraph block after user adds the link by clicking on the search result from mouse.

Actual behaviour

The screen jumps at the top of the paragraph block after user adds the link by clicking on the search result from mouse.

If the paragraph is small and fits in the current viewport, the jump doesn't happen. Screen stays as is.

If the user uses keyboard up/down keys to select the search results and add the link, the jump doesn't happen. Screen stays as is.

Jump happens only when user uses mouse and clicks on search result, to add the link.

Screenshots or screen recording (optional)

Jump happens when using mouse click.

2021-01-21 12 09 01

Jump doesn't happen when small paragraph which fits into viewport.

2021-01-21 12 09 40

Jump doesn't happen when using keyboard up/down keys.

2021-01-21 12 15 03
2021-01-21 12 15 40

WordPress information

  • WordPress version: 5.6
  • Gutenberg version: 9.8.0
  • Are all plugins except Gutenberg deactivated? Yes.
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes. Twenty Twenty

Device information

  • Device: MacBook Pro (16-inch, 2019)
  • Operating system: macOS 10.15.7 (19H114) Catalina
  • Browser: Chrome Version 88.0.4324.96 (Official Build) (x86_64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions