RichTextFX
RichTextFX copied to clipboard
VirtualizedScrollPane with StyleClassedTextArea does not scroll to bottom with dragging scrollbar
Expected Behavior
Dragging the Scrollbar to the bottom scrolls the text inside the StyleClassedTextArea to the last line.
Actual Behavior
This works when using the mouse wheel:
But not when dragging the scrollbar:
Environment info:
- RichTextFX Version: 0.10.9
- flowless Version: 0.6.9
- Operating System: Windows 10
- Java version: 11.0.15
- FX version: 18
Current Workarounds
Extend the Text by adding a new line at the end.
Thanks for reporting, can you please provide demo code as I haven't been able to reproduce my side.
Thanks for the fast reply.
Will try. In a first attempt with a minimal exmaple (without css) I also cannot reproduce it..
Finaly had time to reproduce it with a minimal example:
<?xml version="1.0" encoding="UTF-8"?>
<?import org.fxmisc.flowless.VirtualizedScrollPane?>
<?import org.fxmisc.richtext.StyleClassedTextArea?>
<?import javafx.scene.layout.BorderPane?>
<BorderPane xmlns="http://javafx.com/javafx/" xmlns:fx="http://javafx.com/fxml" fx:controller="com.example.demo.HelloController">
<center>
<VirtualizedScrollPane>
<content>
<StyleClassedTextArea fx:id="area" style="-fx-padding: 0.5em;"/>
</content>
</VirtualizedScrollPane>
</center>
</BorderPane>
Complete Source: main.zip
So the padding seems to be the problem.
@r-sop Thanks for the test case, have submitted a PR to Flowless to fix.