Skip to content

proposal:(@angular/cdk/drag-drop) Overlapping cdkdrop elements respect z-index #13242

Closed
@kccsf

Description

@kccsf

Bug, feature request, or proposal:

Proposal - overlapping cdkdrop elements respect z-index

What is the expected behavior?

cdkdrop with highest z-index takes priority when an element is dragged over multiple overlapping cdkdrop elements

What is the current behavior?

_getSiblingContainerFromPosition uses this._positionCache.siblings.find so uses the first element found, regardless of z-index.

What are the steps to reproduce?

https://angular-92bnjh-jx5aoe.stackblitz.io

What is the use-case or motivation for changing an existing behavior?

cdkdrop elements that overlap are being used for a particular design that uses triangles adjacent to vertically flipped triangles.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/[email protected]

Is there anything else we should know?

Overlapping cdkdrop elements are probably an unlikely use case!

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis issue represents a new feature or feature request rather than a bug or bug fixneeds: discussionFurther discussion with the team is needed before proceeding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions