sandstone
sandstone copied to clipboard
WRR-977: Fixed `Scroller` with `editable` prop to move items or complete edit mode when keydown event fired in pointer mode
Checklist
- [x] I have read and understand the contribution guide
- [x] 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
When selecting an item in an editable scroller and pressing the 5-way keys (e.g. Left, Right, Enter, Down) in pointer mode, the item does not move or the edit mode does not complete.
Resolution
When 5-way key is pressed in pointer mode, only handleGlobalkeyDownCapture
function is called. So I added logic in global keydown handler.
Additional Considerations
-
In qa-sampler, when exiting edit mode after pressing a key multiple times, a blurItem event sometimes occurs. Then no item will be in focus. So I fixed to check the pointer mode in blurItem handler.
-
Removed CSS which makes focus effect of qa-sampler inconsistent in this PR. ** The Pink item does not scale even though it get focused by key because the mouse is hovering over the removeContainer of the pink item. As it was not the UX guide and was only implemented in the sampler, I removed it to avoid confusion later.
-
I fixed the additional issue with 87531b99885382ae69b9e5b18be802bc7cd99f52 commit. ** When button is focused with mouse and press the left/right button, it should move the focus instead of moving the item.
Links
WRQ-30470