Sequence
Sequence copied to clipboard
Multiple phases can be moved to animate-in when no elements are watched
Issue
When no elements are watched via the data-seq
attribute, multiple steps can be moved to the animate-in
position at the same time.
Reproduce
Using the following HTML:
<li id="step1">
<div class="box box1">Box 1</div>
</li>
<li id="step2">
<div class="box box2">Box 2</div>
</li>
<li id="step3">
<div class="box box3">Box 3</div>
</li>
Navigate forwards twice in quick succession (navigation skipping), and the next two steps will both move to animate-in
.
Expected
Only one phase should be in the animate-in
position at a time.
Further
In the Sequence.js themes, we always watch at least one element so this isn't an issue. To not watch any elements seems a little hacky but developers may choose to do this for their own reasons, especially when first learning how Sequence.js works. They may not know how watched attributes work and as such, this will appear like broken functionality to them.