flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Frishberg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-33169) Spark List selection on mobile doesn't work properly
Date Wed, 22 Aug 2012 03:14:38 GMT

    [ https://issues.apache.org/jira/browse/FLEX-33169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439247#comment-13439247

Ryan Frishberg commented on FLEX-33169:

I'm not so sure this is a bug.

On a desktop with a mouse, the list selects the item on mouse down.  However, on a device
in touch interaction mode, the list selects the item on mouse up.  The main reason for this
is the user may want to scroll and not actually select the item (for instance, selecting the
item could transition to a new screen).  Down is different than selected, and an item may
be in the down state and then go into the downAndSelected state (and then the selected state)
or it may go back into the normal state.  The difference between down and selected is subtle,
but down is to show the user that they are on top of something that they might select, but
selected means they've actually selected it.

On mouse down, List keeps track of what item was clicked on, and if a scroll hasn't been started,
then on mouse up, that item will become selected.  You can see what's going on by putting
breakpoints in List.removeMouseHandlersForDragStart() and List.touchInteractionStartHandler().
 If the scrolling is getting triggered, you'll see List.touchInteractionStartHandler() being

If that is indeed the issue, there are ways to stop the scroll from happening.  A scroll doesn't
start immediately, but it waits to make sure the user has moved their finger a certain amount
before deciding it is actually indeed a scroll.  That logic is in TouchScrollHelper.sbRoot_mouseMoveHandler().
 The amount needed to scroll can be controlled with Scroller.mx_internal::minSlopInches. 
You could also stop all scrolls by calling event.preventDefault() on the "touchInteractionStarting"
(TouchInteractionEvent.TOUCH_INTERACTION_STARTING) event.

If that's not the issue, I hope that this will give you some starting points to debug into
what's going on.

There used to be a document on the old Adobe wiki describing some of these behaviors (though
not in as much code detail), but unfortunately, that seems to be lost.  Hopefully someone
at Adobe can find the time to resurrect it.
> Spark List selection on mobile doesn't work properly
> ----------------------------------------------------
>                 Key: FLEX-33169
>                 URL: https://issues.apache.org/jira/browse/FLEX-33169
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: List
>    Affects Versions: Adobe Flex SDK 4.5.1 (Release), Adobe Flex SDK 4.6 (Release)
>         Environment: iOS 5.x, Android 3.2/4.0, Air 3.0 - 3.3
>            Reporter: Al Birdy
> The touch selection of list items on the actual device does not work properly.
> Sometimes, even though the touch has definitely been recognized by the device, the list
selection change isn't committed, instead the previously selected item remains selected.
> To reproduce the issue, please set up a new Flex mobile project and add the most basic
list with inline renderer to a view:
> <s:List id="myList" width="100%" height="100%">
>     <s:dataProvider>
>         <s:ArrayCollection>
>             <fx:Object label="Item1" />
>                          .....
>             <fx:Object label="Item30" />
>         </s:ArrayCollection>
>     </s:dataProvider>
> </s:List>
> Deploy the app to an actual device (this bug does NOT appear in the emulator!) and randomly
try to select items, scroll the list, select again and so on. You'll notice that the down
color is sometimes set, but the selection isn't changed.
> For a more detailed description of this bug please see http://stackoverflow.com/questions/11740074/selection-on-spark-mobile-list-only-works-3-out-of-4-times

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message