Skip to content

fix(Menu): use physical left on web and non-I18nManager RTL - #5288

Open
EnesKartal wants to merge 1 commit into
callstack:mainfrom
EnesKartal:fix/menu-rtl-web
Open

EnesKartal wants to merge 1 commit into
callstack:mainfrom
EnesKartal:fix/menu-rtl-web

Conversation

@EnesKartal

Copy link
Copy Markdown
Contributor

Fixes #5286.

Menu previously switched from { left: leftTransformation } to { right: leftTransformation } whenever direction === 'rtl'. Since leftTransformation is always computed from measureInWindow's physical pageX, setting right only works when React Native's native layout engine mirrors left/right (I18nManager.isRTL on native). On web (and in LocaleProvider direction="rtl" subtrees when I18nManager.isRTL is false), setting right placed the menu at the opposite edge of the screen.

Changes

  • Only use { right: leftTransformation } when Platform.OS !== 'web' && I18nManager.isRTL in src/components/Menu/Menu.tsx, using { left: leftTransformation } otherwise.
  • Add a unit test in src/components/__tests__/Menu.test.tsx verifying RTL web positioning uses left.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 16:33
@github-actions

Copy link
Copy Markdown

Found potential problems with the pull request:

  • Screenshot or video evidence is missing. Make sure to include one if it affects the UI.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Doberjohn Doberjohn added this to the 6.0.0 milestone Nov 24, 2026
@Doberjohn

Copy link
Copy Markdown
Collaborator

Thanks! This goes into 6.0. Could you add before and after screenshots or a short video? Then it is ready for review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu: on web in right-to-left layouts the menu opens on the far side of the screen from its anchor

3 participants