On Tue, 13 Jan 2026 10:35:53 GMT, Christopher Schnick <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/Scene.java line 3721:
>>
>>> 3719: if (! e.isBackButtonDown()) {
>>> counters.get(MouseButton.BACK).clear(); }
>>> 3720: if (! e.isForwardButtonDown()) {
>>> counters.get(MouseButton.FORWARD).clear(); }
>>> 3721: if (cc != null) {
>>
>> Instead of a null check, I would recommend to validate the MouseEvent **e**.
>> `counters` does not have an entry for `MouseButton.NONE`. Instead of null
>> check, below check could fit better:
>> `if (e.getButton() == MouseButton.NONE) return;`
>>
>> Looks like in this issue scenario, this is turning out to be true:
>> `e.getButton() == MouseButton.NONE && e.getEventType() ==
>> MouseEvent.MOUSE_PRESSED`.
>> It would be good to understand why this is happening?
>
> About why this is happening, I saw a reference to JDK-8110944 in the mouse
> button handling code for the NONE type but the issue is not found for me. Is
> the bug ID wrong or is that a restricted issue?
https://bugs.openjdk.org/browse/JDK-8110944 is public now.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2034#discussion_r2687144727