#17165 closed defect (fixed)
Wrong item gets selected when touching a scrolling list
Reported by: | Eric Durocher | Owned by: | Patrick Ruzand |
---|---|---|---|
Priority: | high | Milestone: | 1.10 |
Component: | DojoX Mobile | Version: | 1.8.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Reproduced with dojox/mobile/tests/test_ScrollableView-v.html: scroll the list (fast enough), release finger to let the "slide" animation run, while the list is sliding put (and hold) finger on screen: the list stops sliding (immediately on iOS, a little later on Android), and an item is selected, but it is not the item the finger is over, the selected is significantly higher or lower than the finger point.
Change History (7)
comment:1 Changed 8 years ago by
Owner: | changed from Eric Durocher to Patrick Ruzand |
---|---|
Priority: | undecided → high |
Status: | new → assigned |
comment:2 Changed 7 years ago by
Milestone: | tbd → 1.10 |
---|
comment:3 Changed 7 years ago by
comment:4 Changed 7 years ago by
PR: https://github.com/dojo/dojox/pull/74
Tested on various Android, iOS, BB and WP8 devices without noticing any kind of regression (no perceived slowdown, for instance).
comment:5 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
I reproduce (including with the current master) on various Android 2.x and 4.x devices/browsers, on BB Z10, and on iOS 6, while I do not reproduce on iOS 7 or WP8...
The selection of the item is done via a listener of touchstart (in _ItemBase). The wrong item gets selected because, during the scroll animation, in some browsers the event is dispatched to the element under the finger at a point in time a bit later than the moment the user touched the screen. The offset depends on the scroll animation speed.
Now, rather than trying to obtain that the right item gets selected, I think the good solution is to simply avoid that any item gets selected when touching during scroll animation. This would fit better, given that the purpose of touching during scroll is to stop the scrolling, nothing else. I think it was never intentional to get it selected. I submit a PR for this change.