Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After block removal, selecting a following block sometimes also scrolls the window to the top #21432

Closed
sarayourfriend opened this issue Apr 6, 2020 · 2 comments · Fixed by #21460
Labels
Needs Testing Needs further testing to be confirmed.

Comments

@sarayourfriend
Copy link
Contributor

Describe the bug
When editing a long page and using the shortcut ctrl + opt + z to remove a block at the end of the page with at least two more blocks below it and then clicking on a block lower than the one you removed you’ll get scrolled up to the top of the page. It only happens sometimes though. I’m not sure what the exact conditions are to trigger it but I’m able to get it to happen semi-consistently as you can see in the video.

To reproduce
Steps to reproduce the behavior:

  1. Create a new page that is long enough to need you to scoll to edit the bottom of it.
  2. Add some paragraph blocks with any text in them (“asdf” will do)
  3. Use the keyboard shortcut to remove the second to last block
  4. Click the last block on the page (or the “Start writing…” block)

You'll see that the block you clicked is selected but sometimes you get scrolled to the top of the page.

Expected behavior
The block you clicked is now selected and in view

Screenshots
Video: https://d.pr/v/hw4ZPQ

Desktop:

  • OS: macOS
  • Browser: Firefox
  • Version: 75.0b12

Additional context

  • Version: 7.8
@sarayourfriend
Copy link
Contributor Author

@jasmussen had some ideas about what might be going on here:

I've seen some similar jumpiness in various situations and found it equally hard to reproduce. I've seen it when entering or exiting selection mode (press Escape when editing a block).
I believe the issue is possibly related to focus briefly landing on the parent container, therefore scrolling the viewport there.

@talldan
Copy link
Contributor

talldan commented Apr 7, 2020

Possibly related to #19682.

@talldan talldan added the Needs Testing Needs further testing to be confirmed. label Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Needs further testing to be confirmed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants