On Thu, 8 Dec 2022 10:34:34 GMT, Karthik P K <k...@openjdk.org> wrote:

>> Cause: When slider is dragged for first time after tooltip appears, 
>> setOnMousePressed event was not invoked, hence dragStart was null in the 
>> subsequently invoked event handler (setOnMouseDragged).
>> 
>> Fix: Initialized dragStart in initialize method.
>> 
>> Test: Added system test to validate the fix.
>> 
>> Note: Initializing dragStart in layoutChildren method as suggested in the 
>> bug was causing side effects. Hence initialized dragStart in initialize 
>> method.
>
> Karthik P K has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Add check whether consumeAutoHidingEventsProperty is bound

lgtm

modules/javafx.controls/src/main/java/javafx/scene/control/skin/SliderSkin.java 
line 410:

> 408:         thumb.setOnMouseExited(me -> {
> 409:             Tooltip t = getSkinnable().getTooltip();
> 410:             if (t != null && t.isAutoHide() && 
> !t.consumeAutoHidingEventsProperty().isBound()) {

I still think a second property or a boolean might be better.  What if the app 
code binds autoHidingEventsProperty after onMouseEntered?  I know this is 
highly unlikely, but there is a potential.

At the same time, I  think we should proceed with this fix as it addresses a 
problem which occurs always.

-------------

Marked as reviewed by angorya (Committer).

PR: https://git.openjdk.org/jfx/pull/965

Reply via email to