From d343c7b3f482c17176cca3ddb6e7f8753169ad48 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Mon, 9 Apr 2012 15:15:59 -0700 Subject: Timeline: Bug fix, IKNINJA 1467, "Timeline: Changing layer names should not require hitting "Return" key to commit the change" --- js/components/editable.reel/editable.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js/components') diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js index 7a31e7fd..ca65bc2a 100644 --- a/js/components/editable.reel/editable.js +++ b/js/components/editable.reel/editable.js @@ -115,6 +115,9 @@ exports.Editable = Montage.create(Component, { ///// Save the preEditValue this._preEditValue = this.value; + // Initialize enteredValue with current value + this.enteredValue = this.value; + if(this.selectOnStart) { this.selectAll(); } @@ -189,6 +192,10 @@ exports.Editable = Montage.create(Component, { handleKeydown : { value : function(e) { var k = e.keyCode; + + // Record change + this.enteredValue = this._element.firstChild.data; + //console.log('keyCode: ' + k); } }, -- cgit v1.2.3