angular-hammer icon indicating copy to clipboard operation
angular-hammer copied to clipboard

mixing tap and doubletap on the same element not working on the latest version

Open equilerex opened this issue 10 years ago • 5 comments

Using the latest version, tap and double tap can't be used at the same time on the same element,

the issue seems to be that the "type" passed into "function addRecognizer (manager, type)" is in one case an object {type:tap} instead of string "tap"

ive made an example here (see the console for errors and button actions): http://codepen.io/anon/pen/ByYMqx

equilerex avatar Feb 16 '15 14:02 equilerex

You can work around this bug (one way: do a typeof check on type, if object use type.type), but doing so will cause several tap events to be fired for every doubletap.

To avoid that you would need to make use of requireFailure, but that is a current issue (#23).

Perhaps fixing this should be part of the work for #24?

mattmcdonald-uk avatar Feb 16 '15 15:02 mattmcdonald-uk

yeah, i tried it with type.type but since the old version was working fine, i just continued using that one til it gets a fix... just wanted to point it out if it had not already been found ;)

equilerex avatar Feb 16 '15 15:02 equilerex

Check out the fix in #36, I think that will address your issue. I'm swamped with other stuff at the moment, so this won't be published in a release until at least the weekend (21 Feb 2015).

RyanMullins avatar Feb 19 '15 01:02 RyanMullins

have your problem solved?

luohaoGit avatar Apr 09 '15 02:04 luohaoGit

@RyanMullins Any plan on publishing next release to include #36? Thanks a lot!

kfei avatar Sep 16 '15 17:09 kfei