Skip to content
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

Not working in standard browser on andriod #5

Open
Thorjan opened this issue Oct 8, 2013 · 24 comments
Open

Not working in standard browser on andriod #5

Thorjan opened this issue Oct 8, 2013 · 24 comments

Comments

@Thorjan
Copy link

Thorjan commented Oct 8, 2013

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

@louiswilbrink
Copy link

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.

@wzr1337
Copy link
Owner

wzr1337 commented Oct 21, 2013

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//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 .

@Thorjan
Copy link
Author

Thorjan commented Oct 21, 2013

Hi,

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

GreeTz

Thor

@louiswilbrink
Copy link

hm-Swipe triggers on Android / Chrome for me.

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

@louiswilbrink
Copy link

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
Copy link

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();
};

@wzr1337
Copy link
Owner

wzr1337 commented Oct 21, 2013

can you please post a fiddle?

@Thorjan
Copy link
Author

Thorjan commented Oct 22, 2013

Hi,

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

Thnx...

Thor

@Thorjan Thorjan closed this as completed Oct 22, 2013
@Thorjan Thorjan reopened this Oct 22, 2013
@Thorjan
Copy link
Author

Thorjan commented Oct 22, 2013

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

@wzr1337
Copy link
Owner

wzr1337 commented Oct 22, 2013

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

@Thorjan
Copy link
Author

Thorjan commented Oct 23, 2013

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

@wzr1337
Copy link
Owner

wzr1337 commented Oct 24, 2013

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.

@Thorjan
Copy link
Author

Thorjan commented Oct 25, 2013

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

@louiswilbrink
Copy link

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: hammerjs/hammer.js#388

@r-cohen
Copy link

r-cohen commented Feb 6, 2014

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
Copy link

r-cohen commented Feb 6, 2014

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...

@wzr1337
Copy link
Owner

wzr1337 commented Feb 8, 2014

have you tried to set

swipe_velocity: 0.7

to something lower, like 0.4 ?

@webalchemist
Copy link

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.

@samaxes
Copy link

samaxes commented Oct 23, 2014

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?

@wzr1337
Copy link
Owner

wzr1337 commented Nov 10, 2014

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

@archcra
Copy link

archcra commented Nov 21, 2014

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
Copy link

archcra commented Dec 2, 2014

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

@archcra
Copy link

archcra commented Dec 2, 2014

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

@tinyCucumber
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants