Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#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 6 years ago by cjolif

Owner: changed from Eric Durocher to Patrick Ruzand
Priority: undecidedhigh
Status: newassigned

comment:2 Changed 6 years ago by Patrick Ruzand

Milestone: tbd1.10

comment:3 Changed 6 years ago by Adrian Vasiliu

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.

comment:4 Changed 6 years ago by Adrian Vasiliu

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 6 years ago by Adrian Vasiliu <vasiliu@…>

Resolution: fixed
Status: assignedclosed

In 84e9020f619860de9da6ae04230b5fa5d1e9f633/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 6 years ago by Adrian Vasiliu <vasiliu@…>

In 8dabaf0569aa34e63167175d8069694dfb775427/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:7 Changed 6 years ago by Adrian Vasiliu

This fix incidentally fixes also #17166.

Note: See TracTickets for help on using tickets.