JavaFX 17 breaks scrollbar behaviours in VirtualizedScrollPane
See original GitHub issueStarting with javaFX 17-ea+11 I noticed that scrolling a StyledTextArea (from RichTextFX) no longer worked properly: when clicking the scroll bar elements, the text scrolls for the first couple of clicks and then entirely stop responding to clicks on these elements. It does respond to using the mouse wheel of keyboard arrows however.
https://user-images.githubusercontent.com/7450507/130807718-723b881d-1de7-4dcd-82d3-d95c4fa3848d.mp4
Since it did work with previous early access of jfx (up to 17-ea-9, actually), I did manage to pinpoint that change responsible: https://github.com/openjdk/jfx/pull/454
The above PR changes the type of listener used internally by the built-in bi-directional bindings, from ChangeListeners<T>
to InvalidationListeners
.
This should be transparent to most if not all applications, but because Flowless relies on ReactFX, which interacts with bindings and events in a very intimate way, something was broken by that change.
I managed to workaround the issue in the VirtualizedScrollPane
by replacing the affect bi-directional bindings by a couple of mirrored ChangeListeners
.
I will submit a PR illustrating this workaround for your consideration.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
Okay, will do a release by the weekend unless something crops up …
Can you also put a comment directly in the code changes you’ve already made referring to this issue or the first PR, so that some bright spark doesn’t come along later and say “Hey this should be a bidirectional binding …” and revert the change 😉