Skip to content

Reversing typing order during animation breaks component #31

@rijkvanzanten

Description

@rijkvanzanten

Version

0.4.1

Steps to reproduce

  1. Set typing prop to 1
  2. Change typing prop to -1 during the typing animation
  3. Set typing prop to 1 again after animation

Expected behavior

It should (1.) start typing, (2.) erase the currently typed, and (3.) start typing again

Actual behavior

The plugin sets the visibleChars value in state to a value 1 of from what is should be.
E.g., on erase, visibleChars should be -1, but if you change typing during the transition, it is set to -2. After that wrong value, it toggles between -2 and -1 instead of -1 and the length of the sentence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions