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

non-automatic flush content is not persistent on resize #871

Closed
jcubic opened this issue Apr 9, 2023 · 3 comments
Closed

non-automatic flush content is not persistent on resize #871

jcubic opened this issue Apr 9, 2023 · 3 comments
Labels
Bug resolved if issue is resolved, it will be open until merge with master

Comments

@jcubic
Copy link
Owner

jcubic commented Apr 9, 2023

Issue summary

When you echo something without flush, then flush and resize the text is gone

Expected behavior

Text is not removed

Actual behavior

text is removed

Steps to reproduce

  1. Open Flush without echo command demo
  2. type repro
  3. Resize the page

Additional notes

Found by looking at old demos on CodePen

@jcubic jcubic added the Bug label Apr 9, 2023
@jcubic jcubic changed the title non-flush content is not persistent on resize non-automatic flush content is not persistent on resize Apr 10, 2023
@jcubic
Copy link
Owner Author

jcubic commented Jul 4, 2023

This is a real edge case that happens only when using newline: false with flush: false in a specific order as in the Codepen.

@jcubic
Copy link
Owner Author

jcubic commented Jul 4, 2023

So the problem was the inconsistent state of the DOM (two lines were in a single container with an index of the second one) and the internal state that had two separated lines. So when updating the first line, the index was not found and was ignored.

jcubic added a commit that referenced this issue Jul 4, 2023
Fix problem with `echo(..., {newline: false, flush: false})` where two lines ended
in the same container and the index came from the last line. When refreshing
the first line was ignored becuase the index in DOM was missing.
The fix was to reset the state after newline so both lines are in different
containers
jcubic added a commit that referenced this issue Jul 4, 2023
Fix problem with `echo(..., {newline: false, flush: false})` where two lines ended
in the same container and the index came from the last line. When refreshing
the first line was ignored becuase the index in DOM was missing.
The fix was to reset the state after newline so both lines were in different
containers
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Jul 4, 2023
@jcubic
Copy link
Owner Author

jcubic commented Jul 30, 2023

Released in 2.37.0

@jcubic jcubic closed this as completed Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

1 participant