On Fri, 8 Mar 2024 16:10:26 GMT, Marius Hanl <mh...@openjdk.org> wrote:

>> This PR fixes a long standing issue where the `Tooltip` will always wait one 
>> second until it appears the very first time, even if the 
>> `-fx-show-delay` was set to another value.
>> 
>> The culprit is, that the `cssForced` flag is not inside `Tooltip`, but 
>> inside the `TooltipBehaviour`. So the very first `Tooltip` gets processed 
>> correctly, but after no `Tooltip` will be processed by CSS before showing, 
>> resulting in the set `-fx-show-delay` to not be applied immediately.
>> 
>> Added a bunch of headful tests for the behaviour since there were none 
>> before.
>
> Marius Hanl has refreshed the contents of this pull request, and previous 
> commits have been removed. The incremental views will show differences 
> compared to the previous content of the PR. The pull request contains one new 
> commit since the last revision:
> 
>   JDK-8296387: [Tooltip, CSS] -fx-show-delay is only applied to the first 
> tooltip that is shown before it is displayed

Testing the combined (this PR merged with the latest master) on macOS 14.3.1 M1 
Pro (though this is probably not important), using the latest MonkeyTester
https://github.com/andy-goryachev-oracle/MonkeyTest

- select Tooltip page
- open the Tools -> CSS Playground tool
- type `.tooltip { -fx-show-delay:1ms; }` into Custom CSS text area, press 
Update button.  (this updates the stylesheet in all the open windows)
- hover over the tooltip page

What I see is the very first time the tooltip appears it's using the old 
show-delay value of 1000ms.  Any subsequent attempts the new delay is in 
effect. 

Then, change back to 1000ms.  Same thing happens: the first time the old 
timeout value is used instead of the new.

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

PR Comment: https://git.openjdk.org/jfx/pull/1394#issuecomment-1986520680

Reply via email to