Is this a regression?
The previous version in which this bug was not present was
No response
Description
Apply to: a drawer with mode="side"
Changing page direction between LTR/RTL dynamically, would cause mat-drawer-content to render incorrectly (wrong margin).
I believe replacing margin-right / margin-left with margin-inline-end / margin-inline-start in the following lines would fix the issue.
|
'[style.margin-left.px]': '_container._contentMargins.left', |
Reproduction
Example with settimeout
- change direction to rtl dynamically ,or using dev tools. (in the example, i used setTimeout)
- open drawer => you'll see margin is applied to wrong side
Expected Behavior
- drawer should open from left/right according to document direction
- content should have correct margin depends on start/end or RTL/LTR
Actual Behavior
margin is applied to wrong side for drawer-content
Environment
N/A
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Apply to: a drawer with mode="side"
Changing page direction between LTR/RTL dynamically, would cause mat-drawer-content to render incorrectly (wrong margin).
I believe replacing margin-right / margin-left with margin-inline-end / margin-inline-start in the following lines would fix the issue.
components/src/material/sidenav/drawer.ts
Line 88 in 046e1a2
Reproduction
Example with settimeout
Expected Behavior
Actual Behavior
margin is applied to wrong side for drawer-content
Environment
N/A