eviltrout / ember-cloaking

Support for not rendering offscreen views in an Ember app for performance
MIT License
294 stars 29 forks source link

Cannot perform operations on a Metamorph that is not in the DOM. #19

Closed abarax closed 10 years ago

abarax commented 10 years ago

I have come across this issue and cannot work out whether it is a bug in ember-cloaking or not. It seems like it is though.

Here is a jsbin of the error: http://jsbin.com/ucanam/4525/edit

Just navigate down in to an item and type in to the input box. You will see the error in the console: Cannot perform operations on a Metamorph that is not in the DOM.

It seems like the binding in the "itemcloakview" for the name property of an item is attempting to get updated, even though we have unloaded that view when we clicked on the individual item.

Any ideas?

go1dfish commented 10 years ago

I've ran into similar issues with ember-cloaking but haven't been able to nail down exactly what's causing it either.

abarax commented 10 years ago

Interesting. I think my jsbin is as basic as you can get for triggering the error. I'm hoping that someone with more knowledge of the framework will chime in.

martinmaillard commented 10 years ago

Did any of you find the cause of this error ?

abarax commented 10 years ago

No, unfortunately. Are you experiencing this as well?

martinmaillard commented 10 years ago

Yes, I got the same error message. I'm not sure the cause is similar though. It appears when coming back to the route containing the cloacked-view from another route, during loading state.

g-cassie commented 10 years ago

I am having the same issue. Has anyone made any progress on this?

dpetersen commented 10 years ago

Heads up to folks with this issue, I was having the same problem using 847bb18b9e44f4c5733c0db76df81c536100b962, and it magically went away after @SamSaffron's commits from this past weekend. I dropped the latest code into @abarax's jsbin and there is no more error, either. Hopefully you all have a similar experience.

SamSaffron commented 10 years ago

Awesome, great to hear. Been kicking an idea in my head of also adding another more light weight cloaking method (images and iframes) (we could kick it in first before throwing away the whole view)

On Wed, Jun 4, 2014 at 5:05 AM, Don Petersen notifications@github.com wrote:

Heads up to folks with this issue, I was having the same problem using 847bb18 https://github.com/eviltrout/ember-cloaking/commit/847bb18b9e44f4c5733c0db76df81c536100b962, and it magically went away after @SamSaffron https://github.com/SamSaffron's commits from this past weekend. Hopefully you all have the same experience.

— Reply to this email directly or view it on GitHub https://github.com/eviltrout/ember-cloaking/issues/19#issuecomment-45006793 .

go1dfish commented 10 years ago

Likewise, I don't seem to be running into this issue anymore, I think it can probably be closed.