yapplabs / ember-wormhole

Render a child view somewhere else in the DOM.
MIT License
284 stars 68 forks source link

Changing renderInPlace causes iframe to reload #127

Open jrdn91 opened 3 years ago

jrdn91 commented 3 years ago

This may be a weird use case but here goes.

We have an iframe embedded in our page that runs a react app to display a live video feed with some embedded controls and some other pieces of functionality. We want this to render at the top of our main index page but when someone navigates to another page in the ember app it should basically "popout" and float in the bottom left hand of the screen.

I've gotten this to sort of work with wormhole and changing renderInPlace when the route changes to something that isn't the index route. My issue is I'm guessing because of how the wormhole works it's reloading my iframe content so it's losing some of the react apps changes, such as the user has clicked the play button so the video inside stops playing and goes back to the initial state

When I render a normal ember component in the wormhole place, and log componentDidMount I can see it's not actually rerendering the component, any insight into why this may be happening for my iframe?

I'm using ember-wormhole 0.5.5 and emberjs 1.13