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

Not working in standard browser on andriod

Open Thorjan opened this issue 12 years ago • 24 comments

The gestures don't seem to work on the standard browser of an andriod device.

I've tested it on a Android 4.1.2 and 4.0.3.

If I user the chrome browser on those android devices, it works fine, but not when I use the standard browser. Since most people still use the standard browser that is clearly an issue.

GreeTz Thor

Thorjan avatar Oct 08 '13 19:10 Thorjan

Hi,

First, thank you for writing an angular module for the hammer library.

Here's what I've been seeing so far:

  • hmDrag is working, but not hmPinch. I've tested this using a Nexus 10, Android 4.3, Chrome 30.0.1.1599.82. Both work well on iPad 4 / iOS 7 / Chrome 30.0.1.1599.12.

louiswilbrink avatar Oct 21 '13 17:10 louiswilbrink

Thanks for your Report,

I need to check the pinch on my android. Any other gestures you tried without success?

On Monday, October 21, 2013, Louis Wilbrink wrote:

Hi,

First, thank you for writing an angular module for the hammer library.

Here's what I've been seeing so far:

  • hmDrag is working, but not hmPinch. I've tested this using a Nexus 10, Android 4.3, Chrome 30.0.1.1599.82. Both work well on iPad 4 / iOS 7 / Chrome 30.0.1.1599.12.

— Reply to this email directly or view it on GitHubhttps://github.com/wzr1337/angular-gestures/issues/5#issuecomment-26739739 .

  • Patrick (mobile)

Register on http://zwoup.com for the next Generation Shopping List on your smartphone. You can also follow us on @zwoup at twitter and http://Facebook.com/pages/zwoup .

wzr1337 avatar Oct 21 '13 17:10 wzr1337

Hi,

I've been trying to use hm-Swipe which isn't working.

GreeTz

Thor

Thorjan avatar Oct 21 '13 18:10 Thorjan

hm-Swipe triggers on Android / Chrome for me.

I'll keep the feedback coming as I bootstrap this into my current project.

louiswilbrink avatar Oct 21 '13 18:10 louiswilbrink

Update: hm-Swipe triggers in Android / Chrome, but I get an undefined value when accessing event.gesture. (I'm trying to preventDefault on it)

louiswilbrink avatar Oct 21 '13 18:10 louiswilbrink

hm-double-tap triggers on Android / Chrome, no errors thrown, but the preventDefault() function has no effect (still triggers a browser zoom). This also occurs on iPad 4 / iOS 7 / Chrome:

$scope.doubleTapped = function (event) { event.gestures.preventDefault(); };

louiswilbrink avatar Oct 21 '13 19:10 louiswilbrink

can you please post a fiddle?

wzr1337 avatar Oct 21 '13 20:10 wzr1337

Hi,

Here is a fiddle with swipe that does not work on standard android brower: http://jsfiddle.net/cREN2/5/

Thnx...

Thor

Thorjan avatar Oct 22 '13 08:10 Thorjan

I miss clicked :-s... didn't mean to close the issue.

Thorjan avatar Oct 22 '13 08:10 Thorjan

Don't you get valid $log.log() output with this fiddle? http://jsfiddle.net/cREN2/7/

wzr1337 avatar Oct 22 '13 08:10 wzr1337

Nope,

On my android smartphone there is no console, but I changed the log to an alert(); and it didn't pop-up. It doesn't seem to trigger the 'OpenTekst' or 'OpenImage' functions. On other browsers it does.

GReetZ Thor

Thorjan avatar Oct 23 '13 07:10 Thorjan

Hammer JS demo site works for you, right?

I do not see any difference between a tap, hold or swipe in calling back, so I am wondering why some gestures work and others don't.

I need to digg deeper, but that will take a few days, sorry.

wzr1337 avatar Oct 24 '13 20:10 wzr1337

Yes, I can confirm that the hammer JS demo works on the standard browser of both my android devices

Thnx for investigating this issue.

GreeTz Thor

Thorjan avatar Oct 25 '13 07:10 Thorjan

So the issues I'm seeing seems to be related to hammerjs on Chrome 30.

I made plnkr to test hammer here: http://embed.plnkr.co/OkFBsl5JGE3h7AqfQFCd/preview

Added an issue here: https://github.com/EightMedia/hammer.js/issues/388

louiswilbrink avatar Oct 27 '13 02:10 louiswilbrink

I seem to have the same problem on some recent Android devices with recent version of Chrome. Here is result of my tests using Android 4.4.2 on a Nexus 5 with Chrome 32.

HammerJS demos http://eightmedia.github.io/hammer.js/examples/events.html http://eightmedia.github.io/hammer.js/examples/pull-to-refresh.html http://eightmedia.github.io/hammer.js/examples/carousel.html Result: All demos work fine. All swipe events get triggered.

angular-gestures demo app https://github.com/wzr1337/angular-gestures/tree/master/demo/app Result: No swipe events. Tap, drag, and hold do get logged correctly, but no swipe event. hm-swipe just doesn't get triggered.

r-cohen avatar Feb 06 '14 13:02 r-cohen

Just a note: got swipe to work but you have to swipe like super fast so that it actually registers the swipe event. which isn't the case with Hammer. I saw that the sources of angular-gestures use Hammer version 1.0.5, so what I did is replace the Hammer part by version 1.0.6, but still no success, same result : have to swipe super fast on Android to make it register. Which is a bummer. Don't know if I should continue with angular-gestures or use ngTouch. I used the $swipe service before and was kind of disapointed. Oh well...

r-cohen avatar Feb 06 '14 14:02 r-cohen

have you tried to set

swipe_velocity: 0.7

to something lower, like 0.4 ?

wzr1337 avatar Feb 08 '14 13:02 wzr1337

I was having the same issue with the swipe needing to be very fast. Lowering swipe_velocity worked for me.

swipe_velocity: 0.2 seemed about right.

webalchemist avatar May 13 '14 10:05 webalchemist

hm-swipe-opts="{swipe_velocity: 0.2}" is not working for me, however changing the attribute to hm-swipe-right-opts="{swipe_velocity: 0.2}" does work.

My code looks like this:

<body hm-swipe-left="goTo($event)" hm-swipe-right="goTo($event)" hm-swipe-right-opts="{swipe_velocity: 0.2}">

Do you want me to fill a bug?

samaxes avatar Oct 23 '14 11:10 samaxes

can you guys please check if issue is still open after migrating to hammer 2.0 ?

wzr1337 avatar Nov 10 '14 21:11 wzr1337

Yes, there is still no swipe default on my emulator/phone/pad(all 4.x, but another phone-Android 2.3.7 does work), but use: swipe_velocity: 0.2 maybe work: now it works on emulator.

archcra avatar Nov 21 '14 06:11 archcra

Still not work on phone/pad(4.x). Works on emulator but not very responsible. Only works on Android 2.3.7 perfectly.

archcra avatar Dec 02 '14 02:12 archcra

What does you mean: after migrating to hammer 2.0 ? Maybe there is something misunderstanding.

archcra avatar Dec 02 '14 02:12 archcra

Hi,i have used the module and finded the same problem.And i just want to know that the problem is solved or not?

tinyCucumber avatar Dec 01 '16 10:12 tinyCucumber