8000 fix: Fix scrolling of menus on mobile. by gonfunko · Pull Request #6911 · google/blockly · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Fix scrolling of menus on mobile. #6911

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

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

gonfunko
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Fixes #6759

Proposed Changes

The menu item selection handler is triggered on pointerup vs down.

Behavior Before Change

Attempting to scroll a menu on mobile would select the item that was tapped to initiate the scroll.

Behavior After Change

Menus can be scrolled as expected, and tapping an item selects it.

@gonfunko gonfunko requested a review from a team as a code owner March 20, 2023 19:41
@gonfunko gonfunko requested a review from maribethb March 20, 2023 19:41
@github-actions github-actions bot added the PR: fix Fixes a bug label Mar 20, 2023
Copy link
Contributor
@maribethb maribethb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking for my own understanding-
when you scroll, it doesn't select the item you're hovering over when you stop scrolling and lift your finger, right? and that works because the browser is smart enough to issue a pointercancel event once the element is scrolled? I couldn't find Blockly-specific code that's cancelling it but after a quick review of the pointer events spec that's what I think is happening, and wanted to confirm that's your understanding as well.

@gonfunko
Copy link
Contributor Author

Correct, experimentally it behaves as you describe/would expect - the item you let up on isn't selected, you have to tap (separate from initiating/ending the scroll) to select one.

@gonfunko gonfunko merged commit cbb3829 into google:develop Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to scroll dropdown field on touch devices.
2 participants
0