sandstone icon indicating copy to clipboard operation
sandstone copied to clipboard

WRQ-9559: Fix scrolling by holding pageup/down key

Open vJIYEv opened this issue 10 months ago • 1 comments

Checklist

  • [x] I have read and understand the contribution guide
  • [ ] A CHANGELOG entry is included
  • [x] 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 holding pageup/down key works / does not work case by case.

  • Pointer mode
    • holding pageup/down key works if pointer is out of the component.
    • holding pageup/down key does not work if pointer is in the component.
  • Key mode
    • holding pageup/down key does not work in macOS WebKIt (Safari). (It works in other environments)

We need to fix for all cases to show same behavior.

Resolution

Scrolling by holding pageup/down key occurs because of default behavior of browser. But default behavior varies from browser to browser, so we can't make scroll works if default behavior is not to scroll. To match scroll behavior of all cases, I prevented default behavior when pressed pageup/down key.

Additional Considerations

Links

WRQ-9559

Comments

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

vJIYEv avatar Apr 26 '24 09:04 vJIYEv

Codecov Report

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

Project coverage is 81.43%. Comparing base (e5a4a21) to head (a038026).

Files Patch % Lines
useScroll/useEvent.js 10.00% 5 Missing and 4 partials :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1602      +/-   ##
===========================================
- Coverage    81.45%   81.43%   -0.02%     
===========================================
  Files          148      148              
  Lines         6631     6632       +1     
  Branches      1957     1958       +1     
===========================================
  Hits          5401     5401              
  Misses         936      936              
- Partials       294      295       +1     

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

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