Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

VirtualizedScrollPane with StyleClassedTextArea does not scroll to bottom with dragging scrollbar #1113

Closed
r-sop opened this issue May 24, 2022 · 4 comments · Fixed by FXMisc/Flowless#111

Comments

@r-sop
Copy link

r-sop commented May 24, 2022

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:
scroll_with_wheel

But not when dragging the scrollbar:
scroll_with_bar_drag

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.

@Jugen
Copy link
Collaborator

Jugen commented May 24, 2022

Thanks for reporting, can you please provide demo code as I haven't been able to reproduce my side.

@r-sop
Copy link
Author

r-sop commented May 25, 2022

Thanks for the fast reply.

Will try. In a first attempt with a minimal exmaple (without css) I also cannot reproduce it..

@r-sop
Copy link
Author

r-sop commented Aug 24, 2022

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.

@Jugen
Copy link
Collaborator

Jugen commented Aug 30, 2022

@r-sop Thanks for the test case, have submitted a PR to Flowless to fix.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants