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

Fix: Limit when to prevent the default wheel event (fix #1848) #1851

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gpetrioli
Copy link

@gpetrioli gpetrioli commented Jan 27, 2023

Please check if the PR fulfills these requirements

  • It's submitted to right branch according to our branching model
  • It's right issue type on title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has description for the breaking change

Description

The code prevents the default wheel event only if there is available scroll inside the grid that will happen.

This means that when we have reached the end of the scroll in all directions, it will allow the wheel event to bubble higher and be caught by the browser so that the page will continue scrolling.

Fixes #1848

@gpetrioli gpetrioli changed the title fix: Limit when to prevent the default wheel event (fixes #1848) fix: Limit when to prevent the default wheel event (fix #1848) Jan 27, 2023
@gpetrioli
Copy link
Author

gpetrioli commented Jan 29, 2023

Just a heads up,

it looks like PR #1816 introduced a very greedy event handler, that completely consumes all wheel events that happen while the mouse is over a grid.

This fix introduces some checks that will allow an event to bubble to the top (not get consumed by the handler) if the grid does not need to consume it (if there is no scroll to happen in the direction the wheel events is occurring).

@gpetrioli gpetrioli changed the title fix: Limit when to prevent the default wheel event (fix #1848) Fix: Limit when to prevent the default wheel event (fix #1848) Jan 29, 2023
Only prevent the default event when there will be internal grid scroll
@stale
Copy link

stale bot commented Jun 18, 2023

This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!

@stale stale bot added the inactive label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I cannot scroll up and down if i focus my mouse cursor in the grid
1 participant