-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix(overlay): default to global directionality #9994
fix(overlay): default to global directionality #9994
Conversation
Currently overlays default to the `ltr` direction, which means that consumers, whose apps are in RTL, have to pass in the direction explicitly for every overlay. These changes switch to taking the default direction from the global `Directionality` which is based on the `body` and `html` elements. Fixes angular#9817.
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.
LGTM
@crisbeto Shouldn't this also re-position the Pasta 3 (Spaghetti) and Pasta 4 (Tortellini) in the overlay-demo.ts when toggling the RTL button in the header? I just tested now with your commits and the elements don't automatically reposition themselves. |
@philip-sultanescu this only determines the default direction for overlays, it's still up to the overlays to reposition themselves when the direction changes. |
@crisbeto But shouldn't they automatically reposition themselves like all the other controls do when the bidi event is triggered? |
Currently overlays default to the `ltr` direction, which means that consumers, whose apps are in RTL, have to pass in the direction explicitly for every overlay. These changes switch to taking the default direction from the global `Directionality` which is based on the `body` and `html` elements. Fixes #9817.
That's because the |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently overlays default to the
ltr
direction, which means that consumers, whose apps are in RTL, have to pass in the direction explicitly for every overlay. These changes switch to taking the default direction from the globalDirectionality
which is based on thebody
andhtml
elements.Fixes #9817.