Skip to content

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

Merged
merged 8 commits into from
Jul 9, 2025

Conversation

ndeshev
Copy link
Contributor

@ndeshev ndeshev commented Jul 5, 2025

fixes: #11826

@ndeshev ndeshev requested a review from Copilot July 5, 2025 15:18
Copy link
Contributor

@Copilot Copilot AI left a 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,

@ndeshev ndeshev merged commit a38752a into main Jul 9, 2025
18 of 20 checks passed
@ndeshev ndeshev deleted the tokenizer-rtl-nav branch July 9, 2025 09:48
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 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 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui5-multi-combobox: keyboard navigation over the tokens in ltr mode
3 participants