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

Text with links is animated incorrectly #891

Closed
olshevski opened this issue Jul 29, 2023 · 2 comments
Closed

Text with links is animated incorrectly #891

olshevski opened this issue Jul 29, 2023 · 2 comments
Labels
Bug resolved if issue is resolved, it will be open until merge with master

Comments

@olshevski
Copy link

Issue summary

Echoing text (with typing animation) that contains any links results in a really weird glitchy animation. See the attached video:

Screen.Recording.2023-07-29.at.12.58.58.mov

The text jumps arround and the cursor position is incorrect.

Expected behavior

Any text containing links should be animated linearly and visually correctly. The cursor should not jump to the next line.

Actual behavior

If the printed text contains a link then the animation looks incorrect. The text that comes after the link is printed before the link and the cursor jumps to the next line.

Steps to reproduce

Here is the code from the video:

<script>
    $(function () {
        $('body').terminal({
            test: function() {
                this.echo("text before [[!;;;;https://github.com/jcubic/jquery.terminal]link] text after", { typing: true, delay: 200})
            }
        }, {
            greetings: null,
        })
    })
</script>

And here is the codepen: https://codepen.io/olshevski/pen/KKrrQpo

Browser and OS

The issue is reproduced on:
MacOS Ventura 13.3.1
Google Chrome 115.0.5790.114 (Official Build) (arm64)
Safari 16.4 (18615.1.26.110.1)

@olshevski olshevski added the Bug label Jul 29, 2023
jcubic added a commit that referenced this issue Jul 29, 2023
@jcubic
Copy link
Owner

jcubic commented Jul 29, 2023

The same as with newlines the problem was rendering links in prompt. The issue was in CSS, span had float: left but the links did not so they were rendered at the end.

@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Jul 29, 2023
@jcubic jcubic closed this as completed Jul 30, 2023
@jcubic
Copy link
Owner

jcubic commented Jul 30, 2023

Released in 2.37.0

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

2 participants