Fix for elements sometimes not reappearing after idle #392
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Seen in Firefox 55.0.x. The animation completion callbacks are not
necessarily called in order, and occasionally the callback for elements
being shown occurs after the callback for them being hidden a few
seconds later. This probably isn't helped by every mousemove event
resulting in a fresh call to Utils.animate until the animation is
complete. The result is that the state logic indicates the elements are
shown when in fact they are not, so mousemove does not cause them to be
re-shown.
This change simplifies the logic so that
idle.active
anddata.complete
are true when the elements are shown or being shown, andfalse when the elements are hidden or being hidden, so an animation is
triggered only whenever the desired state is not current or already
becoming current. The animation callback and
data.busy
is now nolonger required.
Also ensured that
data.complete
is initially set correctly accordingto whether the element is initially hidden, and corrected what appears
to be a typo in removeEvent (should remove the mousemove and click
events, not add them).