-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Current transition in not stopping on tap on android devices #441
Comments
a workaround is already in place, if it doesn't work for you I need to know your device/os and complete userAgent. |
I'm still getting this bug on both my android devices: Samsung Galaxy ACE II (Android 4.1.2) and Alcatel 8008D (Android 4.2.1). This bug repeats only in default android browser and WebView component in Cordova. Google Chrome for Android works fine on both devices. This bug repeats for me here http://lab.cubiq.org/iscroll5/demos/simple/ |
some Android devices are not affected, I tried to do some spoofing but it's impossible to foresee all scenarios. the best you can do is calling iScroll with |
|
are you using jquery/jquery mobile? I suggest to set |
I'm using jquery 2.0.3 and hammer.js in my project. 'tap:true' take no effect. I'm tried to test at clear copy http://lab.cubiq.org/iscroll5/demos/simple/ In this case 'preventDefault:false' isn't work. I'm confused now. Now i'm trying to get momentum scrolling (first problem) works as well at clear copy, without side libs to understand the problem. |
use tap:true and listen to 'tap' custom event (instead of 'click' or whatever). |
2x scrolling speed affected by |
this must be related to your current config. try to post a demo somewhere. You may also find help on https://groups.google.com/forum/#!forum/iscroll |
Now i'm talking about empty demo http://lab.cubiq.org/iscroll5/demos/simple/ , not about my own config. I created a video that illustrates difference between android default browser and google chrome for android. http://www.youtube.com/watch?v=KXQBVqbfYqM I'm tried to debug this error. Then if i tap on scrollable div until transition ends (earler than 1.3s), So looks like the code works as well, and css have a right properties. After my tap |
video link seems broken. |
Sorry, i updated the link. http://www.youtube.com/watch?v=KXQBVqbfYqM |
I'll check this out but I can't replicate on my Galaxy S2 and preventDefault:false, which means that it's OS or Device dependent (making debug pretty difficult) |
I just created a fiddle that isolates the problem. In google chrome for android animation stops after 1 second as expected. But in default android browser transition continue playing. cssText changed normally in both cases. |
maybe it doesn't simply support 3d matrix. what's the result of console.log(matrix)? |
I updated the fiddle. This is what i see in log in my android browser:
Same result for the both devices (android 4.1.2 and android 4.2.1). Matrix works fine. Google shows several similar questions: http://stackoverflow.com/questions/15484242/unable-to-stop-css3-transition-of-transform-by-translate3d |
I found the solution that solves the problem. On affected devices changing transition duration to 0ms not stops the current transition, but we can set very small duration that takes effect. I added this hack into 384 and 1289 lines, and it works for me: |
can you try with '0s' or '0'? |
I'm already tried it. Only positive values stops current transition on both my android devices. |
I have to try on all other devices before setting a 0.001 value. Anyway great find! |
Of course it need to be under condition to not affect devices without this bug. |
This fix works for me, too. Will it be pulled into core? |
Worked for me also on Android 4.1.2 (Galaxy S3) However it does add a jitter when you start to scroll |
With useTransition option momentum scrolling looks much more smoothly. But on android devices we can't stop current transition by tapping on the scrollable container until it plays momentum transition. This behaviour is reduces user experience on android devices.
This behavior looks like an android WebView bug, because current transition is not stopping if we change transition properties like transition time = 0. But in some situations current transition stops normally. For example: in long list we start a momentum scrolling with a huge distance. While momentum scrolling (transition) is in progress we can start new momentum scrolling (tap - move - release) in the reverse direction. And it starts immediately. So, that means that technically we can stop transition in progress on android WebView.
I'm trying to resolve this bug, but have no success for now. There is interesting SO answer, that provides solution (hack) for this bug: http://stackoverflow.com/questions/15484242/unable-to-stop-css3-transition-of-transform-by-translate3d
The text was updated successfully, but these errors were encountered: