neilcsmith-net commented on PR #7009:
URL: https://github.com/apache/netbeans/pull/7009#issuecomment-1914827280

   The bug and fix I linked to in JDK 19 makes the scroll pane react to mouse 
wheel events even when no scroll bar is visible.  Our code seems to rely on 
them never being there to filter out scrolling.
   
   > Fact is that adding an empty mouse wheel listener, already restores the 
old behavior on JDK 19+: nothing happens on scroll over the line number bar. I 
can't remember of an instance that adding an empty listener did ever change 
behavior in swing before!
   
   It's not that unusual that adding a listener filters events being handed up 
to the ancestor.  See the documentation for `MouseWheelEvent` -
   
   ```
    * MouseWheelEvents start delivery from the Component underneath the
    * mouse cursor.  If MouseWheelEvents are not enabled on the
    * Component, the event is delivered to the first ancestor
    * Container with MouseWheelEvents enabled.  This will usually be
    * a ScrollPane with wheel scrolling enabled.
   ```
   
   The fix seems to make sense to me.  And also that there is not a JDK bug 
involved.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to