]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Fix iframe resize handler when re-attached to DOM (#3527)
authorSimon Brunel <simonbrunel@users.noreply.github.com>
Mon, 31 Oct 2016 07:47:28 +0000 (08:47 +0100)
committerGitHub <noreply@github.com>
Mon, 31 Oct 2016 07:47:28 +0000 (08:47 +0100)
commit5012dcbdaefa7a11a8dfcd9ff264655e9860ee50
tree8ac3d5813b1763118a55c66e90fce8aa9e220acc
parentf288bc727b34873542faea5d50585cb842eb02f9
Fix iframe resize handler when re-attached to DOM (#3527)

When the iframe is attached to the DOM, its content is reloaded (invaliding the resize listener) so make sure to install the handler after the iframe is loaded. Optimize resize events by throttling resize process until the next animation frame. Rewrite the unit test "waitForResize" method, the previous one (timeout) was too weak and most tests was failing on FF.
src/core/core.helpers.js
test/core.controller.tests.js