This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ngTouch: In swipe directives, Event object is not available as $event #4071
Comments
ghost
assigned bshepherdson
Sep 21, 2013
Can confirm the same - issue I'm having is that swipeRight triggers in desktop when selecting text with mouse. |
The swipe handler is triggered on mouseup or touchend, once the swipe has finished. It's possible to add $event back to the ng-swipe scope as per ng-click (it will be a mouseup or a touchend) but then using stopPropagation on it won't have the effect you desire because a separate click event is still being generated. |
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this issue
Jan 27, 2014
Existing documentation implies that an Event object should be available as `$event` on swipe directives, which previously was only working for `ng-click`. Closes angular#4071 Closes angular#4321
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this issue
Jan 27, 2014
Existing documentation implies that an Event object should be available as `$event` on swipe directives, which previously was only working for `ng-click`. Closes angular#4071 Closes angular#4321
@jsteenkamp Were you ever able to resolve that issue? I'm having the exact same problem. |
@nbieber - did not get back to it. I just removed swipe for menu reveal on project and planned to reinstate it later. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there!, in the docs it says that Event object should be available as $event on swipe directives (http://docs.angularjs.org/api/ngTouch.directive:ngSwipeLeft), this is not working. It only works for ng-click. Here is an example in Plunker:
http://plnkr.co/edit/I0DvVA?p=preview
I'm trying to access $event in the swipe directive to use $event.stopPropagation() because sometimes (not always) I'm getting a click event after the swipe event. You should also see this behavior in the example... (maybe is this another bug?). Greets!
The text was updated successfully, but these errors were encountered: