We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 616bec4 commit 04ed4ebCopy full SHA for 04ed4eb
1 file changed
assets/js/phoenix_live_view/live_socket.js
@@ -364,7 +364,9 @@ export default class LiveSocket {
364
let view = this.newRootView(body)
365
view.setHref(this.getHref())
366
view.joinDead()
367
- if(!this.main){ this.main = view }
+ // When there's a rootViewSelector it's not appropriate for document.body to be the
368
+ // main view since all the connected elements must be scoped under that selector
369
+ if(!this.main && !this.rootViewSelector){this.main = view }
370
window.requestAnimationFrame(() => view.execNewMounted())
371
}
372
0 commit comments