Only setInterval once to animate the loading icon #2888

Closed
opened 2016-02-25 18:28:33 +00:00 by wjt · 2 comments

(On Chrome, at least,) window.onload() is called once by hand, and once
by the browser. This ends up calling setInterval() twice. When
stopAnimation() is called later, only the second interval is cleared; so
the first one keeps firing forever. Mostly harmless but unnecessary.

(On Chrome, at least,) window.onload() is called once by hand, and once by the browser. This ends up calling setInterval() twice. When stopAnimation() is called later, only the second interval is cleared; so the first one keeps firing forever. Mostly harmless but unnecessary.
0x2620 added the
frontend
label 2016-02-25 18:28:33 +00:00
0x2620 added this to the 14.04 milestone 2016-02-25 18:28:33 +00:00
0x2620 self-assigned this 2016-02-25 18:28:33 +00:00
0x2620 added the
normal
defect
labels 2016-02-25 18:28:33 +00:00
Author

Attachment 0001-Only-setInterval-once-to-animate-the-loading-icon-fi.patch (2199 bytes) added

**Attachment** 0001-Only-setInterval-once-to-animate-the-loading-icon-fi.patch (2199 bytes) added
Owner

In 7d99950/pandora:

#!CommitTicketReference repository="pandora" revision="7d999509426cfb425cb441a492ec8698aaff3ed9"
Only setInterval once to animate the loading icon (fixes #2888)

(On Chrome, at least,) window.onload() is called once by hand, and once
by the browser. This ends up calling setInterval() twice. When
stopAnimation() is called later, only the second interval is cleared; so
the first one keeps firing forever. Mostly harmless but unnecessary.

Only the first hunk of this patch is really needed, but making
startAnimation() / stopAnimation() idempotent can't hurt.
In [7d99950/pandora](https://code.0x2620.org/0x2620/pandora/commit/7d999509426cfb425cb441a492ec8698aaff3ed9): ``` #!CommitTicketReference repository="pandora" revision="7d999509426cfb425cb441a492ec8698aaff3ed9" Only setInterval once to animate the loading icon (fixes #2888) (On Chrome, at least,) window.onload() is called once by hand, and once by the browser. This ends up calling setInterval() twice. When stopAnimation() is called later, only the second interval is cleared; so the first one keeps firing forever. Mostly harmless but unnecessary. Only the first hunk of this patch is really needed, but making startAnimation() / stopAnimation() idempotent can't hurt. ```
0x2620 added the
fixed
label 2016-03-03 12:38:51 +00:00
j closed this issue 2016-03-03 12:38:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: 0x2620/pandora#2888
No description provided.