Commit 3a2d13e
committed
fix(cdk/drag-drop): preview positioned incorrectly when RTL is set on the body (#29606)
As of #28945 we use a popover to display the preview so that it's always on top. To do so we need to push the popover from its default position at the center to the top/left which is done using `margin: auto`. Since we were setting `margin: 0`, the element was ending up at top/right in RTL, if `dir="rtl"` is set on the `html` or `body`.
These changes fix the issue by pushing the element to the top/left using `margin-right: auto`.
Fixes #29604.
(cherry picked from commit 04ce4d2)1 parent b2a32e9 commit 3a2d13e
2 files changed
+15
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
838 | 837 | | |
839 | 838 | | |
840 | 839 | | |
| |||
846 | 845 | | |
847 | 846 | | |
848 | 847 | | |
849 | | - | |
850 | 848 | | |
851 | 849 | | |
852 | | - | |
| 850 | + | |
853 | 851 | | |
854 | 852 | | |
855 | 853 | | |
| |||
860 | 858 | | |
861 | 859 | | |
862 | 860 | | |
863 | | - | |
| 861 | + | |
864 | 862 | | |
865 | 863 | | |
866 | 864 | | |
| |||
880 | 878 | | |
881 | 879 | | |
882 | 880 | | |
883 | | - | |
884 | 881 | | |
885 | 882 | | |
886 | | - | |
| 883 | + | |
887 | 884 | | |
888 | 885 | | |
889 | 886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| |||
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
0 commit comments