-
Notifications
You must be signed in to change notification settings - Fork 202
Description
I'm using typeit-react 2.6.4 in React 18.2.0. I'm trying to add a keyhandler to make a TypeIt instance finish its queue all at once. I've tried:
instance.options({speed: 0}).go()
...but that doesn't seem to have any effect. I'd assume this should work, as the docs says .options() is to "update options on the fly" but I must be misinterpreting them.
I've tried
instance.reset();
instance.options({speed: 0}).go()
...but this just restarts the original queue at the original speed.
I've tried
instance.flush();
instance.options({speed: 0}).go()
...but that doesn't seem to clear the existing queue, or change the speed. It erases what's been typed, but then continues from where it left off, with new timeouts added interleaved with the existing ones, so the result is a jumble of letters. Here's an example result from executing the above code immediately after "jump" in "The quick brown fox jumps over the lazy dog.":
"s overT hthee qluaizcyk dborgo.wn fox jump"
Is this a bug or a feature request?
For the record instance.empty().go() doesn't seem to have any effect on a currently executing queue either.