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

[Tiny PR] Multi selection: fix scroll alter select #18973

merged 2 commits into from Dec 8, 2019


Copy link

ellatrix commented Dec 6, 2019


During upward mouse selection, the page always gets scrolled. This is because MultiSelectScrollIntoView looks at the wrong block ID, the last one in the DOM order. Instead, it should be looking at the end of the selection.

Also rewrites the component with hooks.

How has this been tested?

Selecting upwards with the mouse should not scroll the page when you let go.
Selecting with keyboard up and down should scroll appropriately.


Types of changes

Bug fix


  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .
@ellatrix ellatrix requested review from talldan and youknowriad as code owners Dec 6, 2019
@ellatrix ellatrix changed the title [Tiny PR ] Multi selection: fix scroll alter select [Tiny PR] Multi selection: fix scroll alter select Dec 6, 2019
@ellatrix ellatrix added this to the Gutenberg 7.1 milestone Dec 6, 2019

This comment has been minimized.

Copy link
Member Author

ellatrix commented Dec 7, 2019

I think this is important to have in the 7.1 release for a smooth multi selection experience (no scrolling when selecting upwards), so I'll merge this. :)

@ellatrix ellatrix merged commit 8f649f2 into master Dec 8, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
@ellatrix ellatrix deleted the fix/multi-selection-scroll branch Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.