Opened 9 years ago

Closed 8 years ago

#12979 closed defect (wontfix)

Mobile Scrolling freezes on Android HTC Desire device

Reported by: emanners Owned by: ykami
Priority: blocker Milestone: tbd
Component: DojoX Mobile Version: 1.6.1
Keywords: scrolling htc desire android 2.X Cc: Atsushi Ono
Blocked By: Blocking:

Description

Try some of the dojo mobil sample apps, either via PhoneGap? or using a mobile browser and you'll find scrolling through a list in dojo mobile consistently freezes for HTC Desire devices and Android 2.X for ScrollableView? (http://dojotoolkit.org/reference-guide/dojox/mobile/ScrollableView.html) Its not just this framework, I have found the same issue with other frameworks as well, with the same device spec. This is quite a significant issue, and HTC Androids are so common place in the market place.

http://www.sencha.com/forum/showthread.php?104155-FIXED-131-Android-Scrolling-Issues/

If you want to see it in action try

http://www.dublintravelplan.com and take the menu "spire of dublin" (or any other) and scroll up and down a few times and you will note it freezes.

Attachments (1)

testList.html (3.2 KB) - added by vasiliu 9 years ago.
Simple app using RoundRectList? and ListItem?, for which scrolling never works (with current dojo-trunk)

Download all attachments as: .zip

Change History (13)

comment:1 Changed 9 years ago by ykami

Yes, we've been tackling with this issue along with the android screen flicker issue (#12723), but we still haven't found any feasible workaround yet. As you pointed out, this problem can easily be reproduced with other frameworks such as Sencha or iScroll as well. Also we realized the problem exists on particular android devices. Some other android devices do not seem to have this problem. What we know so far is that even during the screen freeze, if we touch the screen, touch events are coming, event handlers are being called, and dom is being updated properly. That is, JavaScript is running internally, but only the screen is frozen.

Changed 9 years ago by vasiliu

Attachment: testList.html added

Simple app using RoundRectList? and ListItem?, for which scrolling never works (with current dojo-trunk)

comment:2 Changed 9 years ago by vasiliu

We face this issue on Android HTC Desire (Android 2.2). Now, curiously, on this device I get freezes only from time to time using the app at http://www.dublintravelplan.com (mentioned in the description of the ticket), while with our testList.html (attached here) scrolling NEVER works. Reproduced with the current state of dojo-trunk (dojo 1.7) as of June 7th.

comment:3 Changed 9 years ago by vasiliu

To check whether this might explain the different behavior between my attached testList.html and the app at http://www.dublintravelplan.com, I've tried the testList.html with, and without "mblAlwaysHideAddressBar: true" in djConfig. In both cases, I was never able to scroll. So either there is some other difference in the settings, or simply in the number of items, or maybe the difference comes from a change in dojo between the version used in http://www.dublintravelplan.com and the current dojo-trunk?

comment:4 Changed 9 years ago by Atsushi Ono

We've been continuing to work on this issue, but still not reached to any acceptable workaround. I summarized several findings we got so far;

  • Reproduced on HTC Desire/HTC EVO (2.2.x), not on Nexus S (2.3.x).
  • The root cause of this issue is an android (or webkit) level issue. Therefore other mobile frameworks such as iScroll and Sencha are also facing this issue. An detail investigation related to the iScroll case was reported at http://groups.google.com/group/iscroll/browse_thread/thread/9c9dcbf6f79f8187/a5beaca4aa864c10.
  • Browser's UI thread seems to get paused when you repeat flick actions to scroll while event listeners are added to touchstart/touchmove/touchend events. And paused UI thread seems to be often resumed, for example, by the following actions:
    • Change device orientation (portrait <-> landspace)
    • Flick the area where touchstart/touchmove/touchend event listeners are not added. (e.g. Fixed header/Fixed footer areas)
  • We tried to emulate those actions above by JavaScript?, but it does not work to resume UI thread. OS (or webkit) level event messages might be needed to resume it.
  • We also tried to reduce touchstart/touchmove/touchend event listeners, which so far resulted in choppy scrolling animations though.

comment:5 Changed 9 years ago by vasiliu

Thanks for this detailed information. On my side, I just realized the following: When using a dojox.mobile.View on IPhone I'm able to scroll the list, despite not using a dojox.mobile.ScrollableView?. This made me think it is expected to also scroll on Android. But apparently this was a wrong assumption. By changing the attached testList.html to use the ScrollableView?, I'm now able to get it scroll on HTC Desire, while experiencing from time to time the freeze mentioned in this ticket (the orientation change unfreezes it). I'm not really sure about why the dojox.mobile.View allows browser scrolling on IPhone while dojox.mobile.ScrollableView? is needed on Android. Your lights would be welcome.

comment:6 Changed 9 years ago by ykami

I took a look at your code and noticed <body>'s overflow style was "hidden". The page never scrolls with this style. I haven't tested it on android, but I guess this must be your problem. (It is necessary for ScrollableView though.)

comment:7 Changed 9 years ago by lee

ykami, are there any work-arounds for this?

And by work-arounds I mean anything e.g. feature detection for android platforms? I'm worried reading about this bug as it seems a native issue, in order to promote multi-platform builds (phonegap) I'd be willing to almost do anything to make sure the user experience is as simlar as possible to iphone, if not as similar then at least usable. It works wonderfully on my iphone, on my android it's unusable and a blocker.

A list of possible work-around options would be good as there'll be a huge user base who have this problem. Thanks

comment:8 Changed 9 years ago by ykami

No, we still haven't come up with any workarounds, even something that could reduce the frequency of freeze, yet. Of course we've been trying to find out android platform specific solutions/workarounds, but not successful so far.

comment:9 in reply to:  8 Changed 9 years ago by lee

If it's any use:
Android 2.2
Kernel 2.6.32-g29e526b (HTC)
Webkit 3.1
At build prep time for Android I'm considering replacing ScrollableView? with a normal View.

Replying to ykami:

No, we still haven't come up with any workarounds, even something that could reduce the frequency of freeze, yet. Of course we've been trying to find out android platform specific solutions/workarounds, but not successful so far.

comment:10 Changed 9 years ago by ykami

Cc: Atsushi Ono added

comment:11 Changed 8 years ago by lee

I wanted to give my own testing updates so far after packaging natively through phonegap on the same android. I've written a few fairly bloated test apps and the scrolling problem disappears completely when run natively (webview), though it happens consistently when ran over http. It seems to get better over http when using a minified build as well compared to running against source (using trunk)

comment:12 Changed 8 years ago by ykami

Resolution: wontfix
Status: newclosed

We already have spent much time in investigation on this HTC-specific problem, and concluded that there's nothing we can do from JavaScript side, since JavaScript is up and running normally while the screen is frozen. We have no plan to further investigate this issue unless we get new information. So I'm closing this ticket.
Regarding the above comment from bod, I think webview is a different story, and from our experience, I don't think whether minified or source matters, because it is a runtime UI thread problem.

Note: See TracTickets for help on using tickets.