-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
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.
Jump doesn't happen when small paragraph which fits into viewport.
Jump doesn't happen when using keyboard up/down keys.
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)