We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb2c582 commit 1180ac9Copy full SHA for 1180ac9
1 file changed
assets/js/phoenix_live_view/hooks.js
@@ -264,6 +264,15 @@ Hooks.InfiniteScroll = {
264
}
265
},
266
267
+ updated() {
268
+ // Check if the scroll container still exists
269
+ // https://github.com/phoenixframework/phoenix_live_view/issues/4169.
270
+ if (!this.scrollContainer.isConnected) {
271
+ this.destroyed();
272
+ this.mounted();
273
+ }
274
+ },
275
+
276
destroyed() {
277
if (this.scrollContainer) {
278
this.scrollContainer.removeEventListener("scroll", this.onScroll);
0 commit comments