Hi, since I updated FeathersUI to the latest version I’ve been noticing the lack of the mouse double click event. Components like the ListView and the Panel that previously listened to these events are not responding to them anymore. Did something change about this at the latest release?
There shouldn’t be any difference in Feathers UI that I recall. However, if you were seeing this change before updating to yesterday’s OpenFL 9.4 update, then I guess that there must be some kind of difference.
If you were seeing this change after updating to the new OpenFL 9.4 update, one difference is that the doubleClickEnabled
property of TextField
is no longer true
by default. It’s false
by default in Flash, so we wanted to match that. If you are double-clicking while the mouse is hovering over some text, that may explain it.
Getting Flash and OpenFL double click events to dispatch can be kind of tricky sometimes. You need to set doubleClickEnabled
to true
, of course. However, that may not always be enough. If the display object has children you might need to do something else. There are usually two options:
-
Set
doubleClickEnabled
on the deepest children in the container. -
Set
mouseChildren
tofalse
on the container. This will prevent mouse events from reaching any of the children, though, so while this is easiest, it’s not always the correct solution.
If you can’t use mouseChildren
on the outermost container, it may be possible to use mouseChildren
a little bit deeper. For instance, in a ListView
, you might be able to set mouseChildren = false
and doubleClickEnabled = true
on the item renderers, and I think that the event will bubble up to the ListView
.
Oh, yes, it did change after yesterdays’ update. I noticed that all double clicks were being activated over a TextField as you said. The solution worked: I went into the ListView item renderer and set the doubleClickEnabled property to true and it started workig again.
Thank you a lot!