-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
bug(cdk): Wrong offset of dragged element on RTL #29604
Labels
Comments
It looks like this was caused by #28945. I'm still figuring out how we can work around it. |
crisbeto
added
P2
The issue is important to a large percentage of users, with a workaround
area: cdk/drag-drop
and removed
needs triage
This issue needs to be triaged by the team
labels
Aug 19, 2024
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Aug 19, 2024
…on the body As of angular#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 angular#29604.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Aug 19, 2024
… the body As of angular#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 angular#29604.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Aug 19, 2024
… the body As of angular#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 angular#29604.
crisbeto
added a commit
that referenced
this issue
Aug 20, 2024
… 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)
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Is this a regression?
The previous version in which this bug was not present was
17.2.2
Description
When in RTL mode, and try to drag a element from a list, the element is offset to the right with the length of the screen width
Reproduction
StackBlitz link: https://stackblitz.com/edit/kuk7sb?file=src%2Findex.html
Steps to reproduce:
Expected Behavior
The element should be under the drag start position (mouse) like it was in v17
Actual Behavior
Recording.2024-08-18.143452.mp4
Environment
The text was updated successfully, but these errors were encountered: