sandstone icon indicating copy to clipboard operation
sandstone copied to clipboard

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

Open vJIYEv opened this issue 11 months ago • 1 comments

Checklist

  • [x] 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
  • [x] 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])

vJIYEv avatar Apr 01 '24 09:04 vJIYEv

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 :warning:
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              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 01 '24 09:04 codecov[bot]