Closed rodo61 closed 13 years ago
This also occurs on a Nexus 1 with Android 2.2.
Seems to be an issue with the implementation of the 'tap' event, which the 'back' button requires. The 'tap' event is a combination of the 'touchStart', 'touchMove', and 'touchEnd' events. If there's movement registered between start and end, a 'tap' is not triggered. On the Nexus 1, any movement (even a single pixel) triggers touchMove and results in no triggering of a 'tap' event.
One fix is to require a specific delta in the movement before it effects the overall event. That can be added in the 'touchStart' handler of the 'tap' event around line 68 of jquery.mobile.event.
Thanks for the information.
I'll try to fix this so that I can go on testing with my smartphone. Can you tell me how to access the movement informations/coordinates.
Will this be fixed in coming versions?
Thanks, Rolf
The quick hack that I'm current using -- around line 65 of jquery.mobile.event.js, $.event.special.tap, in the bind callback for touchStartEvent: var moved = false, touching = true, origPos = [ event.pageX, event.pageY ], originalType, timer;
function moveHandler() {
if ((Math.abs(origPos[0] - event.pageX) > 10) ||
(Math.abs(origPos[1] - event.pageY) > 10)) {
moved = true;
}
}
Hope that helps.
Elmo, you made my day!! It works. That tap-event is the troublemaker :-) I hope it will be fixed in the next version. Thanks a lot, Rolf
We had an issue with android not clicking, and while Elmo's fix sorts it out, it created another issue that it would click everything, even when you're trying to drag. In the end the issue was fixed with by changing:
Link name <a href='whatever'></a>
to:
<a href='whatever'>Link name</a>
Don't know why it was like that in the first place, but that's a possible reason for Android not clicking.
Hi,
I load the demo (http://jquerymobile.com/demos/1.0a1/) on my HTC Hero (android 2.1). Then I touch the "Intro to jQuery Mobile" button. The page loads. Then the back button does not work. I have to use the hardware back button. That works. The same with "Features" and other buttons like "Toolbars". It seems as if the back button doesn't work on HTC Hero, Android 2.1
I wrote a sample app (http://speibl.com/jquerymobile/test01/). The same here. The back button doesn't work.
Firmware-Version: 2.1-update1 Browser-Version: WebKit 3.1
Tell me if you need need more information (build-number or other).
Regards, Rolf