Skip to content
Unverified Commit f2de58db authored by Vincent Petry's avatar Vincent Petry
Browse files

Work around snap.js state mess



Snap.js is not robust enough to prevent multiple calls to open() or
close(), so we added more checks to prevent these happening even when an
animation is in progress.

Because if we let this through, snap.js will not notice that the
animation is already done (or a duplicate animation was started),
so the "transitionend" event will not fire a second time.

During an animation, snap.js sets up a setInterval() that hogs the CPU
during the animation. Since a transition doesn't always end due to the
above conditions, that CPU hogging would stay forever.

This is the best workaround so far, it seems it's not possible to cancel
that interval from the outside nor to trigger events to make it do so.

Signed-off-by: default avatarVincent Petry <vincent@nextcloud.com>
parent ff08b10a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment