emberjs/ember.js — Issue #447: Uncaught Error: Cannot perform operations on a Metamorph that is not in the DOM.
Author: ryanto
Created: 2012-01-26 15:55:40+00:00
State: open

I am getting this error when changing the binding on a view. Here is the simplest version of code I can reproduce the error on.

View

```javascript
App.PageView = Ember.View.extend({
loadingBinding: 'App.loading',
templateName: 'whatever'
});
```

Template

```handlebars
{{#if loading}}
Loading
{{/if}}
```

When I App.set('loading', true) it will show the loading screen. When I App.set('loading', false) it will hide the loading screen, but then throw: Uncaught Error: Cannot perform operations on a Metamorph that is not in the DOM.

Stacktrace

```
Uncaught Error: Cannot perform operations on a Metamorph that is not in the DOM.
g.checkRemovedember.js:11
g.replaceWithember.js:11
Ember.Metamorph.Ember.Mixin.create.domManagerClass.Ember.Object.extend.replaceember.js:11
cember.js:9
jember.js:9
f.flushember.js:9
f.endember.js:9
Ember.run.endember.js:9
i
```

Versions:

Chrome 16
ember-0.9.4.min.js