Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
27
rated 0 times [  32] [ 5]  / answers: 1 / hits: 89983  / 8 Years ago, sun, march 20, 2016, 12:00:00

When I do this:



<div (click)=func1() (dblclick)=func2()>Some text</h1>


I actually get func1() to fire even on dblclick twice.



How can I make it work on the same element and work good?


More From » angular

 Answers
10

Doesn't seem to be an Angular issue. See https://css-tricks.com/snippets/javascript/bind-different-events-to-click-and-double-click/



The workaround is to not process the click event when a dblclick happens shortly afterwards.


[#62872] Thursday, March 17, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mckinleyk

Total Points: 730
Total Questions: 99
Total Answers: 99

Location: South Georgia
Member since Fri, Nov 13, 2020
4 Years ago
;