-
Notifications
You must be signed in to change notification settings - Fork 125
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
Item in array with a (click) event fired on "mouse up" #143
Comments
This is due to the way navigation is handled in Angular. One of the ways to work around this situation is to use a timer on the mousedown event and assume that any (mousedown -> mouseup) that happens in a specified interval is a click:
A better solution could be tracking the position of the mousedown and mouseup event and assume it is a click if both events' positions are close.
|
Thanks! This worked like a charm, with one exception. I had to use an event listener as the function isn't always passed through from the component. |
If I drag the carousel left <> right, when I mouse up, it fires a (click) event to the object in the array.
feature-story itself has a click handler (click)="GoToStory(storyID)"
Is there a simple way to disable this? It doesn't appear to be happening on mobile, only with the mouse/trackpad.
The text was updated successfully, but these errors were encountered: