Hi Carlos,
Can you post some example app so I can understand the problem? We’re using List in several places in our app, including label and icon renderers, and haven’t had this problem. ________________________________ From: carlos.rov...@gmail.com <carlos.rov...@gmail.com> on behalf of Carlos Rovira <carlosrov...@apache.org> Sent: Tuesday, July 3, 2018 12:44:17 AM To: dev@royale.apache.org Subject: Re: List Item renderer Click event finds a component in its way Hi Yishay, thanks for let me know about it. I'm playing with it but I didn't get to work. The case is that maybe List component is not ready for this yet. * event.currentTarget seems not exists in ItemRenderers * I can use "itemClicked" event in a MXML List (I think is not set the metadata and the rest of wiring) * List change event doesn't work as well. Hope you or other could point me to a more elegant solution since right now, since for me the actual solution is a hack that must be converted to something more final. Thanks 2018-07-02 16:38 GMT+02:00 Yishay Weiss <yishayj...@hotmail.com>: > Take a look at ItemRendererMouseController.handleMouseUp() in Basic. It > uses currentTarget. > > > > > > > > ________________________________ > From: carlos.rov...@gmail.com <carlos.rov...@gmail.com> on behalf of > Carlos Rovira <carlosrov...@apache.org> > Sent: Monday, July 2, 2018 5:27:08 PM > To: dev@royale.apache.org > Subject: List Item renderer Click event finds a component in its way > > Hi, > > what's the best way to handle a click event in a List when the Item > renderer has some components that can interfere in the click event? > > I have an icon and a Label in the item renderer and if I click on one of > those "event.target" is logically set to this components. > > How to make "event.target" always resolve to the item-renderer, even if I > click in the label or the icon. > If the label or the icon has a click event, then clicking on one of those > components should call it's own click handler, but if nothing is set up, a > click in any part of the renderer should call the list click event handler. > > In JS I can set pointer-events : none for sub components in item renderers > but does not seems the best way to handle this > > thanks > > -- > Carlos Rovira > http://about.me/carlosrovira > -- Carlos Rovira http://about.me/carlosrovira