Skip to content
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): The cursor should always be forbidden for dragging disabled items. #27242

Closed
1 task
zhonglin94 opened this issue Jun 6, 2023 · 2 comments · Fixed by #27286
Closed
1 task

bug(CDK): The cursor should always be forbidden for dragging disabled items. #27242

zhonglin94 opened this issue Jun 6, 2023 · 2 comments · Fixed by #27286
Labels
area: cdk/drag-drop docs This issue is related to documentation P4 A relatively minor issue that is not relevant to core functions

Comments

@zhonglin94
Copy link

zhonglin94 commented Jun 6, 2023

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

No response

Description

The cursor should always be forbidden for dragging disabled items.

Media1.mp4

Reproduction

Reproduce link: https://material.angular.io/cdk/drag-drop/overview#disabled-dragging
Steps to reproduce:

  1. Go to the reproduce link(the disabled dragging section)
  2. Drag the disabled item
  3. The cursor is the pointer for the first time
  4. Drag the disabled item again
  5. The cursor becomes forbidden

Expected Behavior

The cursor should always be forbidden for dragging disabled items.

Actual Behavior

The cursor is a pointer when dragging the dragging disabled items sometimes.

Environment

  • Angular: 16.0.3
  • CDK/Material:16.0.3
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@zhonglin94 zhonglin94 added the needs triage This issue needs to be triaged by the team label Jun 6, 2023
@garrettld
Copy link

The behavior you're seeing isn't from the CDK, it's from your browser. The thing you're dragging on step 4 of your reproduction is not the drag item at all, it's the text you highlighted in step 2, and the cursor changing is your browser's behavior. It works exactly the same on all text elements, regardless of whether they use CDK drag/drop.

@crisbeto crisbeto added docs This issue is related to documentation P4 A relatively minor issue that is not relevant to core functions area: cdk/drag-drop and removed needs triage This issue needs to be triaged by the team labels Jun 7, 2023
naaajii added a commit to naaajii/components that referenced this issue Jun 13, 2023
crisbeto pushed a commit that referenced this issue Jun 13, 2023
* docs(cdk/drag-drop): fix cursor for disable drag

fixes #27242

* fixup! docs(cdk/drag-drop): fix cursor for disable drag
crisbeto pushed a commit that referenced this issue Jun 13, 2023
* docs(cdk/drag-drop): fix cursor for disable drag

fixes #27242

* fixup! docs(cdk/drag-drop): fix cursor for disable drag

(cherry picked from commit ff7ea81)
crisbeto pushed a commit that referenced this issue Jun 13, 2023
* docs(cdk/drag-drop): fix cursor for disable drag

fixes #27242

* fixup! docs(cdk/drag-drop): fix cursor for disable drag

(cherry picked from commit ff7ea81)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 14, 2023
stephenrca pushed a commit to stephenrca/components that referenced this issue Aug 2, 2023
* docs(cdk/drag-drop): fix cursor for disable drag

fixes angular#27242

* fixup! docs(cdk/drag-drop): fix cursor for disable drag
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: cdk/drag-drop docs This issue is related to documentation P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants