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

Not working correctly inside CDK drag and drop #549

Open
mebibou opened this issue Jan 10, 2024 · 1 comment
Open

Not working correctly inside CDK drag and drop #549

mebibou opened this issue Jan 10, 2024 · 1 comment

Comments

@mebibou
Copy link

mebibou commented Jan 10, 2024

When used within a cdkDrag component, it becomes impossible to edit the content without doing a right-click first.

There is a solution explained here: https://stackoverflow.com/a/64084061/517193

Maybe we could have an option that will automatically add the mousedown event and prevent the bubble up? or add it by default?

@mebibou
Copy link
Author

mebibou commented Jan 10, 2024

For now, this is what worked for me:

<angular-editor (blur)="fixEditor($event)"></angular-editor>

...


public fixEditor($event) {
    const content = $event.target as HTMLDivElement;
    content.onmousedown = event => event.stopPropagation();
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant