st-h / ember-content-editable

A contenteditable component for ember-cli that just works™
MIT License
66 stars 31 forks source link

Value gets out of sync with html view #4

Closed friksa closed 9 years ago

friksa commented 9 years ago

When you press enter, the value does not match what is seen in the browser (value may not have the line feed where it is in the browser). Found this workaround to keep them in sync.

  updateValue: Ember.on('keyUp', function(event) {
    this.handleKeyUp(event);
    var v=this.stringInterpolator(this.$().text());
    this.set('value', v);
    this.$().html(v);
  }),
chrissloey commented 9 years ago

Was this a problem with 0.2.4? I introduced a bug there that sounds similar to this. Can you check if 0.3.0 fixed this?

friksa commented 9 years ago

have not tested it with new updates... will test it and report back

friksa commented 9 years ago

tested the latest build and not an issue. Awesome job!