-
Notifications
You must be signed in to change notification settings - Fork 277
fix(ui5-multi-combobox): fix RTL arrow navigation to and from the tokens #11857
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the arrow key navigation in MultiComboBox
to correctly handle focusing and returning from tokens in both LTR and RTL modes, and adds Cypress tests to verify the behavior.
- Factor out cursor/selection checks into a
_shouldFocusLastToken
getter. - Implement separate
_handleArrowLeft
and_handleArrowRight
methods conditioned on direction. - Expand tokenizer keydown logic to respect both left/right arrows in RTL/LTR.
- Add comprehensive Cypress specs covering RTL/LTR arrow navigation scenarios.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
packages/main/src/MultiComboBox.ts | Added isLeft import, introduced _shouldFocusLastToken getter, refactored arrow handlers, and updated tokenizer keydown logic for RTL/LTR. |
packages/main/cypress/specs/MultiComboBox.cy.tsx | Added new test suite “MultiComboBox RTL/LTR Arrow Navigation” with scenarios verifying focus transitions in both directions. |
Comments suppressed due to low confidence (1)
packages/main/src/MultiComboBox.ts:737
- The comment mentions ‘beginning/end’ but the implementation only tests the logical beginning. Either update the comment to reflect the actual logic or adjust the code to cover the RTL end-of-input case.
// If the input is focused and the cursor is at the beginning/end of the input,
minor refactoring and tests stabilization attempts
attempt to stabilize the remote execution
🎉 This PR is included in version v2.13.0-rc.0 🎉 The release is available on v2.13.0-rc.0 Your semantic-release bot 📦🚀 |
fixes: #11826