Skip to content

cdkDrag containing textarea and cdkDragHandle causes positioning glitches #12718

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

Closed
intellix opened this issue Aug 17, 2018 · 2 comments
Closed
Assignees

Comments

@intellix
Copy link

Bug, feature request, or proposal:

Bug

What is the expected behavior?

To be able to drag elements containing a textarea like there isn't one

What is the current behavior?

They move to weird positions and cdkDragHandler doesn't get used

What are the steps to reproduce?

Providing a StackBlitz reproduction is the best way to share your issue.

StackBlitz starter: https://goo.gl/wwnhMV

https://stackblitz.com/edit/angular-3h4hbb?file=src%2Fapp%2Fapp.component.html

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

You would expect any element inside a cdkDrag to work along with cdkDragHandle

@crisbeto
Copy link
Member

Your example doesn't work because of the following:

  1. The directive for the handle is called cdkDragHandle, not cdkDragHandler.
  2. The preview "jumps" because it becomes larger than the initial element. You have to add box-sizing: border-box to it for the sizing to work correctly.

Here's a working fork of the example.

@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 Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants