Closed
Description
🐛 Bug Report
useColorSlider PageUp/PageDown keys increment or decrement by (max-min) / 10, which is the default behavior for a native input. However, color channels have a pageSize
that differs depending on the channel. For example, for RGB values the pageSize is 16
, a factor of 256
, and for Hue, the pageSize
is 15
, a factor of 360
.
- Open https://reactspectrum.blob.core.windows.net/reactspectrum/a98461602538bcf63009a17e31900726819a4af6/storybook/index.html?path=/story/colorslider--default
- Navigate to the ColorSlider for the Red channel.
- Press Home key to set value to 0.
- Press PageUp to increment by pageSize.
We also need to ensure that both onChange and onChangeEnd fire with PageUp/PageDown/Home/End
🤔 Expected Behavior
ColorSlider should increment by the pageSize, 16.
😯 Current Behavior
Instead it navigates by 255 / 10, which rounds to 26.
💁 Possible Solution
🔦 Context
Related to #2570.
Depends on #2661
💻 Code Sample
🌍 Your Environment
Software | Version(s) |
---|---|
react-spectrum | @react-aria/[email protected] |
Browser | Chrome version 96.0.4664.55 (Official Build) (x86_64) |
Operating System | macOS Big Sur version 11.6.1 (20G224) |
🧢 Your Company/Team
Adobe/Accessibility
🕷 Tracking Issue (optional)
Metadata
Metadata
Assignees
Labels
No labels