-
-
Notifications
You must be signed in to change notification settings - Fork 576
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
Short lines in previously hidden terminal when terminal have position: fixed #466
Comments
The code is handling this by using Intersection and Mutation observers. One is used if you create terminal on div that's not yet in DOM and the second when div is not visible, will look into that. Quick test of the pen give this:
it probably get the width of the terminal which is 0, when it's not visible. Right now you can fix this by using: $('#term').show().terminal().resize(); |
The issue is |
The problem was that Intersection Observer don't work if element have |
The fix will be in version 2.2.0 you can try it from CDNJS url https://cdn.jsdelivr.net/gh/jcubic/jquery.terminal@devel/js/jquery.terminal.min.js |
Great, thanks! |
* chore(package): update jquery.terminal to version 1.17.0 * chore(package): update jquery.terminal to version 2.0.2 * update jquery.terminal to version 2.1.2 * Force terminal resize (jcubic/jquery.terminal#466) Closes #58
Expected behavior
I expect to be able to attach the terminal plugin to a div even if the div is currently hidden. When I show the div later ("on-demand" console) it should display text correctly.
Actual behavior
When I show the div later, the text in the terminal is split into lines, one character per line. When I enter new text it is being split too.
Steps to reproduce
See this code pen: https://codepen.io/paulsmirnov/pen/NozwLQ
Browser and OS
Windows 10 + Chrome/Firefox/Edge
Hints
The text was updated successfully, but these errors were encountered: