You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dom-repeat is used with chunked rendering, it schedules a requestAnimationFrame which is not cancelled when the element is disconnected from the DOM. As a result, even after the component is detached from the DOM, it keeps running code.
No RAF should have been printed after the component is detached
Actual Results
There is at least a couple more.
Browsers Affected
Chrome
Firefox
Edge
Safari 11
Safari 10
IE 11
I only tested on Chrome, but looking at the implementation of dom-repeat it should affect all of them.
Versions
Polymer: 2.8.0 and 3.4.1
webcomponents: v1
Potential fix
Adding cancelAnimationFrame(this.__chunkingId); to disconnectedCallback in dom-repeat.js seems to resolve the issue, but I don't know what other consequences that could have.
The text was updated successfully, but these errors were encountered:
Description
When
dom-repeat
is used with chunked rendering, it schedules arequestAnimationFrame
which is not cancelled when the element is disconnected from the DOM. As a result, even after the component is detached from the DOM, it keeps running code.Live Demo
https://jsbin.com/sirelojane/1/edit?html,console,output
Steps to Reproduce
Run the script, look at the console.
Expected Results
No
RAF
should have been printed after the component is detachedActual Results
There is at least a couple more.
Browsers Affected
I only tested on Chrome, but looking at the implementation of
dom-repeat
it should affect all of them.Versions
Potential fix
Adding
cancelAnimationFrame(this.__chunkingId);
todisconnectedCallback
in dom-repeat.js seems to resolve the issue, but I don't know what other consequences that could have.The text was updated successfully, but these errors were encountered: