Skip to content

bug(cdk): Wrong offset of dragged element on RTL #29604

Closed
@vladretca

Description

@vladretca

Is this a regression?

  • Yes, this behavior used to work in the previous version

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:

  1. add dir="rtl" to html tag in index.html
  2. try to drag an element from the list

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

  • Angular: 18.1.3
  • CDK/Material: 18.1.3
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: cdk/drag-drop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions