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
Since ember-source 3.17.0-beta.1, helpers rendered inside an {{each}} block are re-computed/re-rendered when the passed list changes by reference. In these scenarios, the existing helper content is removed from the DOM and re-appended.
This has led to a few issues in our app with event targets not being present in the DOM by the time the event has propagated to any global event listeners (on the document/window).
The example is a little contrived in how it induces the {{each}} re-evaluation, but it does illustrate that, since 3.17.0 (through present: 3.18.1), helpers are being torn down and re-appended to the DOM where components / elements don’t.
<=3.16.8
>= 3.17.0-beta.1
While I show a click on a path in both screenshots above it happens equally to the svg node - I can simplify this reproduction further to a helper that simply inserts a div if that would be helpful.
The text was updated successfully, but these errors were encountered:
Since ember-source
3.17.0-beta.1
, helpers rendered inside an{{each}}
block are re-computed/re-rendered when the passed list changes by reference. In these scenarios, the existing helper content is removed from the DOM and re-appended.This has led to a few issues in our app with event targets not being present in the DOM by the time the event has propagated to any global event listeners (on the document/window).
Minimal reproduction
I’ve put together an reproduction of this in a component by invoking
ember-inline-svg
inside an{{each}}
block in a fresh app: https://github.com/22a/ember-helper-re-render-reproThe example is a little contrived in how it induces the
{{each}}
re-evaluation, but it does illustrate that, since 3.17.0 (through present: 3.18.1), helpers are being torn down and re-appended to the DOM where components / elements don’t.<=
3.16.8
>=
3.17.0-beta.1
While I show a click on a
path
in both screenshots above it happens equally to thesvg
node - I can simplify this reproduction further to a helper that simply inserts adiv
if that would be helpful.The text was updated successfully, but these errors were encountered: