-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
[Composite] Support RTL navigation, Home/End keys #825
Conversation
Netlify deploy preview |
6cbc53d
to
769a89d
Compare
// Wait for FocusManager `returnFocus` to execute. | ||
queueMicrotask(() => { | ||
elementsRef.current[nextIndex]?.focus(); | ||
}); |
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.
@atomiks This broke a RadioGroup test... https://app.circleci.com/pipelines/github/mui/base-ui/4867/workflows/dbe5234b-0110-4b20-8b7e-d8dfd310df29/jobs/34622/parallel-runs/0/steps/0-106
Any idea why?
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.
The test breaks but it still works in the browser, I've separated this for now
769a89d
to
af7ac7f
Compare
25940ee
to
7f7132b
Compare
2b4dc8d
to
a3a3554
Compare
This reverts commit 64661e9.
c575bdf
to
6a4217b
Compare
const toEndKeys = isRtl | ||
? { | ||
horizontal: [ARROW_LEFT], | ||
vertical: [ARROW_DOWN], | ||
both: [ARROW_LEFT, ARROW_DOWN], | ||
}[orientation] | ||
: { | ||
horizontal: [ARROW_RIGHT], | ||
vertical: [ARROW_DOWN], | ||
both: [ARROW_RIGHT, ARROW_DOWN], | ||
}[orientation]; |
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.
This could be a bit simpler by assigning const horizontalEndKey = isRtl ? ARROW_LEFT ? ARROW_RIGHT
and same for start
ee60c98
to
3b05773
Compare
2351003
to
c65d478
Compare
Split from #763 to unblock #751
Closes #824
direction
property that could be inherited from the HTMLdir
attributeenableHomeAndEndKeys
prop