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

First string typed is not showing #526

Closed
stefankempf opened this issue Dec 19, 2022 · 4 comments
Closed

First string typed is not showing #526

stefankempf opened this issue Dec 19, 2022 · 4 comments

Comments

@stefankempf
Copy link

Description

The first string I use for the typewriter animation is not showing.

Demo

https://codepen.io/stefankempf/pen/JjBjEWq

Workaround

Use an empty span as first element.

Same as #518

@digisomni
Copy link

I am getting this issue too.

@mattboldt
Copy link
Owner

huh, this is odd. Looks like it only happens if there is extra space in the typed element at the start. In your codepen, when I updated it to <span id="typed"></span>, it worked correctly 🤔

@mattboldt
Copy link
Owner

mattboldt commented Apr 1, 2023

Ah, I know what's happening. If you start with an element like this:

<span id="typed">Some static text</span>

typed.js will detect "Some static text" exists, and it will backspace it as part of the animation. However, due to a bug, it now thinks that it needs to move forward to the "next" string to animate. It skips the 1st one because it thinks it's already backspaced it.

Not sure of good a fix right now, but I'll put some thought into it.

@mattboldt
Copy link
Owner

Fixed with the latest release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants