From what I can see Web 2.0 is far newer than native browser support for ondblclick so not sure why thereâs a workaround/hack rather than using the native behaviour.
Weâve been reviewing this issue and yes, the value was a bit low. Now that the double click event is supported, the goal is to replace our implementation with browserâs event, so itâs more accesible.
In 2022r2, weâll be increasing the time between clicks from 200ms to 500ms (itâs 400ms by default on Linux, @Rick_Araujo checked on Windows and is 500ms there). Weâll make sure that this change doesnât delay other events, like SelectionChanged.
In 2022r3, unless we find any compatibility issue, weâll replace our implementation with the native browser double click event.
The double click is a complement to the first click. SelectionChanged should be rised from the first one no matter if there is going to be a DoubleClick.
There is another problem that you are not considering. The TIME is only one HALF of what is considered to make a double-click. It is the maximum number of milliseconds that can elapse between a first click and a second click to consider the mouse action a double-click. 500ms is a good default.
People are used to the standar way in which something works, if you make a half baked implementation of that behavior, many are going to complain about strange behavior.
To have a better âhand madeâ double click implementation, you must implement the DoubleClick SIZE. The DEFAULT on windows for this is a region of 4px by 4px, if the second click is outside this region, it must be a second click NOT a double click
Try 400 to 450 first. I even saw people enforcing 450 (subtracting -50ms when finding 500+ in some apps). And later check the necessary cascade of dependent events and enforce it. Like, only examines and fires SelectionChanged after the examination of DoubleClick, if one could be possible in such context. Doubleclick->click(if not double)->selection(if a click) This will allow you select a group of records and execute a double click on them.
Correct, now is too fast and until ondblclick is part of Xojo, we need to test the beta when available to make sure the time is not too long and users canât double click if the mouse moved more than a few pixels. Thanks for the heads-up.
Yes, right clicking on a row will display the Contextual Menu, if present, and make sure the row will get selected. If it wasnât selected, then you will also receive the SelectionChanged event.
Itâs not just the event, the underlying component has event handlers also that can be in conflict. Iâm sure back then it was necessary to implement it that way.
The same happens with other components or layers of the framework.
Hopefully weâll be able to replace it on 2022r3 anyway, and keep improving it