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

add preventDefaultEvent flag to ngResizable mousedown #119

Merged
merged 2 commits into from
Nov 11, 2018

Conversation

mecp
Copy link
Contributor

@mecp mecp commented Nov 2, 2018

We use https://github.com/zzarcon/default-passive-events in our project, which makes mousedown a passive event, so when using Resizable directive, it produced

Unable to preventDefault inside passive event listener invocation.

@Yamazaki93
Copy link
Contributor

Yamazaki93 commented Nov 3, 2018

A suggestion, it seems the original ngResizable behavior is to call preventDefault() and this changes it to not call preventDefault() since Input() preventDefaultEvent = false; unless specifically overridden. It might be better to use the negation of that so users who doesn't want ngResizable to call preventDefault() will set [preventDefaultEvent]="false"

@mecp
Copy link
Contributor Author

mecp commented Nov 6, 2018

@Yamazaki93 that's a good suggestion, thanks. will update it.

@xieziyu xieziyu merged commit 8fe40aa into xieziyu:master Nov 11, 2018
@xieziyu
Copy link
Owner

xieziyu commented Nov 11, 2018

@mecp @Yamazaki93
Thank you for your contribution. It's helpful.

@mecp mecp deleted the rz-prevent-default-flag branch November 11, 2018 13:07
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

Successfully merging this pull request may close these issues.

3 participants