robertklep / buffered-ext-list-sencha-touch-2

Buffered Ext.List for Sencha Touch 2
13 stars 6 forks source link

scrolling past the top of the list has weird behavior in Android #5

Open drtan8 opened 12 years ago

drtan8 commented 12 years ago

If you load the example in Android browser, and you try to scroll past the top of the list, the scrolling becomes jerky and stuck. I noticed that in this state, the touchend event is not fired due to some reasons. Scrolling past the bottom of the list is fine though.

Any clue? I will spend some time to see if I can fix it. Any clue is appreciated.

By the way, thanks for working on this!

robertklep commented 12 years ago

Just had a quick look, the 'itemtouchevent' should be fired. If not, it would probably mean that something in onItemTouchEnd is failing.

I don't have any Android debugging environment set up, so it's kinda hard to debug. Perhaps some old-fashioned alert-style debugging might give you more information on where it fails?

drtan8 commented 12 years ago

I know for sure that the touchmove and touchend are not fired properly (in Sencha's internal). These 2 events stop firing once the scrolling went over the top of the list. I'm digging into the code to find out why.

robertklep commented 12 years ago

In Chrome I do see touchend-events being generated (and received) after scrolling over the top, so I'm not quite sure why ST wouldn't fire them on Android (unless you hit a Webkit-on-Android bug). I'm using ST 2.0.0 (because 2.0.1 gave me some grief which made me decide to go back, can't remember why exactly though).

Keep me posted on your findings :)

drtan8 commented 12 years ago

I confirmed that the TouchGesture.js onEvent (bound using document.addEventListener to touchmove event) is not firing somehow. I don't see any exception anywhere so I'm at a complete loss on this.

I will try to remove chunks of code from BufferedList to try to identify if there's a specific chunk that causes this. Either this or go to Android code :(

robertklep commented 12 years ago

Have you tried using an Ext.dataview.List (xtype:list) instead of a BufferedList? Should be a drop-in replacement.

BufferedList inherits from that class, it would make an easy check to see if BufferedList is causing the issue or if there's something in ST not being compatible with Android.

drtan8 commented 12 years ago

The original List is working fine. That's why it looks like there is a specific code that causes this behavior.

drtan8 commented 12 years ago

It seems that I fixed this by adding a condition so that the top of the list is not redrawn if it's already there. By the way this issue affects iOS too. I will do a pull request after more testing.

robertklep commented 12 years ago

Cool, thanks :)

russimicro commented 3 months ago

Nice day.. I require the solution that was given to this problem... Thank you