question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JavaFX 17 breaks scrollbar behaviours in VirtualizedScrollPane

See original GitHub issue

Starting 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:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Jugencommented, Sep 6, 2021

Okay, will do a release by the weekend unless something crops up …

1reaction
Jugencommented, Aug 25, 2021

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 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Weird ScrollBar behavior when bound to ScrollPane ScrollBar
I have built a control that provides Twitter Bootstrap navbar-like behaviour for JavaFX. It basically consists of a StackPane with a ...
Read more >
VirtualizedScrollPane (Flowless 0.6 API) - FXMisc
Unbinds scrolling from Content before returning Content. Scroll the content horizontally by the given amount. Scroll the content vertically by the given amount ......
Read more >
ScrollBar (JavaFX 17)
ScrollBar sets focusTraversable to false. This example creates a vertical ScrollBar: ScrollBar s1 = new ScrollBar(); s1.setOrientation(Orientation.VERTICAL);
Read more >
Flowless - Efficient VirtualFlow for JavaFX - JavaRepos
JavaFX 17 breaks scrollbar behaviours in VirtualizedScrollPane. Starting with javaFX 17-ea+11 I noticed that scrolling a StyledTextArea ...
Read more >
The flowless from FXMisc - Coder Social
JavaFX 17 breaks scrollbar behaviours in VirtualizedScrollPane. Starting with javaFX 17-ea+11 I noticed that scrolling a StyledTextArea (from RichTextFX) no ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found