Repository navigation
fix(RtlService): read computed direction, so an LTR island on an RTL page is LTR - #289
Merged
Merged
Conversation
…n RTL page is LTR Any dir="rtl" ancestor won over the element's own direction. Computed direction decides now; nearest [dir] only without one (detached element; SSR, Domino returns inline style only). Callers: tabs-list, chip-set; pro adds rating, OTP, stepper, range-slider, autocomplete.
:dir() missing in Chrome/Edge 119, inside Angular 22 browser floor. Without computed direction (detached, SSR) dir="auto" cannot be resolved, so it is skipped for the next explicit dir.
xidedix
added a commit
that referenced
this pull request
Oct 10, 2026
- feat(chip): add `c-chip` and `c-chip-set` (#288) - feat(chip-input): add `c-chip-input` (#290) - fix(theme.directive): `colorScheme="light"` kept on first render (#287) - fix(rtl.service): read the computed direction, so an LTR island on an RTL page is LTR (#289) - chore(dependencies): update to Angular 22.2.2, `@types/node` to 26.6.5 Verified: `npm ci`, lint, tests 60 + 781 + 30, 3 prod builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RtlService.isRTL(element)returned true for every element under adir="rtl"ancestor, so a component inside adir="ltr"island on an RTL page mirrored its arrow keys and slider clicks. It now reads the element's computeddirection, so adir="ltr"island anddirection: ltrfrom CSS are LTR. Without a computed direction (detached element, SSR) the nearestdir="ltr"ordir="rtl"ancestor decides,dir="auto"skipped, then the document. No:dir(), which Chrome and Edge 119 lack.Changed answers for direct callers:
tel,url,emailandnumberfields, which the reboot keeps LTR, are LTR on an RTL page; a detached element with nodir="ltr"ordir="rtl"ancestor gets thedirof<html>or<body>instead offalse.Specs for the service and for chip set in an island. Docs examples on a pro build, LTR island on an RTL page: tabs, rating, OTP and stepper arrows, range slider clicks and labels match the LTR page; a fully RTL page is unchanged.