Skip to content

Commit

Permalink
[BUGFIX beta] Don't render attr if current value is same as new value
Browse files Browse the repository at this point in the history
  • Loading branch information
raytiley authored and rwjblue committed Feb 25, 2015
1 parent bb4ddec commit 140fe64
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ember-views/lib/attr_nodes/attr_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ AttrNode.prototype.render = function render(buffer) {
if (this.attrName === 'value' && (value === null || value === undefined)) {
value = '';
}

// If user is typing in a value we don't want to rerender and loose cursor position.
if (this.attrName === 'value' && this._morph.element.value === value) {
return;
}

if (this.lastValue !== null || value !== null) {
this._morph.setContent(value);
Expand Down

0 comments on commit 140fe64

Please sign in to comment.