Skip to content
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

Directionality service to monitor dynamic changes to the 'dir' attribute at the top-level. #17637

Open
vdjhards opened this issue Nov 7, 2019 · 0 comments

Comments

@vdjhards
Copy link

@vdjhards vdjhards commented Nov 7, 2019

Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/flexlayoutgap-with-rtl-with-wrong-direction

Steps to reproduce:

  1. First Inspect the TopbarLeft div and see that it gives the margin-right 5px as it is mention in fxLayoutGap="5px" in parent div

  2. Now Click On 'Toggle Direction' Button (you can see that its direction has been changed to RTL)

Expected Behavior

What behavior were you expecting to see?

As per the FlexLayout documentation if i use RTL on body tag then my direction will change to rtl and the fxLayoutGap="5px" will render to margin-left:5px to its child div.

Actual Behavior

What behavior did you actually see?

I am not getting the desired result. I can find the margin-right still present in RTL instead of margin-left. There may be some issue with the Directionality service. It looks like that the service only checks the top-level (HTML) or body-level (body) for the presence of a dir attribute.

Default State when application loads

Before Click

After Clicking on 'Toggle Direction' button

after tgl

@vdjhards vdjhards changed the title Directionality service to monitor dynamically changes of the attribute at the top-level Directionality service to monitor dynamic changes to the dir attribute at the top-level. Nov 7, 2019
@vdjhards vdjhards changed the title Directionality service to monitor dynamic changes to the dir attribute at the top-level. Directionality service to monitor dynamic changes to the 'dir' attribute at the top-level. Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.