Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Auto-scrolling to bottom of console breaks with multiple M118. #904

Closed
gauravmm opened this issue Oct 11, 2022 · 1 comment · Fixed by #921
Closed

Auto-scrolling to bottom of console breaks with multiple M118. #904

gauravmm opened this issue Oct 11, 2022 · 1 comment · Fixed by #921
Labels
GH - Bug Something isn't working

Comments

@gauravmm
Copy link
Contributor

Fluidd Version

1.7.0-f1b32a9

Browser

Chrome, Firefox

Device

Laptop, Mobile device (Phone, Tablet or similar)

Operating System

Windows, Linux

What happened

When a macro emits multiple M118 commands in rapid succession (or a plugin prints data with multiple lines) the console scroll no longer sticks to the bottom and no longer follows output.

What did you expect to happen

I expect the console to continue remaining "stuck" to the newest output.

How to reproduce

Define the macro:

[gcode_macro TEST_MULTILINE_M118]
gcode:
    M118 LINE 1
    M118 LINE 2
    INVALID_COMMAND
    M118 LINE 3
    M118 LINE 4

Run the command TEST_MULTILINE_M118 repeatedly in the console until it fills the console view. The next invocation of TEST_MULTILINE_M118 will stop scrolling partway through the output.

(This was first observed with the automatic z-calibration Klipper plugin, and can be seen there.)

Additional information

Looking into src/components/widgets/console/Console.vue, the issue seems to be the this.updateScrollingPaused() at the end of scrollToLatest.

Control flow only reaches that call if scrolling is not already paused, so there is no need to call this.updateScrollingPaused() to check if scrolling should be paused or unpaused after scrolling to the bottom. Commenting this one line out fixes the issue and does not appear to cause any problems.

Let me know if you'd like me to submit a pull request for this one-liner.

@gauravmm gauravmm added GH - Bug Something isn't working GH - Evaluation Needed This topic needs to be discussed to evaluate it's aspects and feasability labels Oct 11, 2022
@gauravmm gauravmm changed the title Scrolling to bottom incorrectly performs on when a macro emits multiple M118 to Console. Auto-scrolling to bottom of console breaks with multiple M118. Oct 11, 2022
@matmen matmen removed the GH - Evaluation Needed This topic needs to be discussed to evaluate it's aspects and feasability label Oct 11, 2022
@matmen
Copy link
Member

matmen commented Oct 11, 2022

This doesn't seem to happen with the flipped console layout turned on, hence why I couldn't reproduce #877.
Thanks for the report and repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GH - Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants