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

WRQ-9560: Fix scrolling by pageup/down key depending on pointer focus #1584

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

vJIYEv
Copy link
Contributor

@vJIYEv vJIYEv commented Apr 1, 2024

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

Scrolling by pageup/down key shows different behavior depending on pointer focus in some cases.

  • scroll behaviors vary depending on if you click inside the component after first entry or not
  • scroll distance is longer than expected if pointer is out of the component
  • scroll does not work if pointer is out of 'Scroller' component (Windows Firefox only)

Resolution

This issue occurs because of default behavior of scrolling by pageup/down.
But we use handlers pageKeyHandler, scrollByPageOnPoinerMode and scrollByPage when pressed pageup/down key,
and there's code not to scroll if pointer is out of the component in handler function.
So scrolling when pointer is out of component is wrong behavior.
I prevented default behavior when pressed pageup/down key.

Additional Considerations

Links

WRQ-9560

Comments

Enact-DCO-1.0-Signed-off-by: Jiye Kim ([email protected])

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.10%. Comparing base (1c5ce74) to head (f3ba7ef).
Report is 15 commits behind head on develop.

Files Patch % Lines
useScroll/useEvent.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1584      +/-   ##
===========================================
- Coverage    81.11%   81.10%   -0.02%     
===========================================
  Files          142      142              
  Lines         6520     6521       +1     
  Branches      1928     1928              
===========================================
  Hits          5289     5289              
- Misses         937      938       +1     
  Partials       294      294              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Enact-DCO-1.0-Signed-off-by: Jiye Kim ([email protected])
Enact-DCO-1.0-Signed-off-by: Jiye Kim ([email protected])
@vJIYEv vJIYEv changed the title WRQ-9560: Fix scrolling by pageup/down key by preventing default behavior WRQ-9560: Fix scrolling by pageup/down key depending on pointer focus Apr 17, 2024
Enact-DCO-1.0-Signed-off-by: Jiye Kim ([email protected])
Enact-DCO-1.0-Signed-off-by: Jiye Kim ([email protected])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant