diff options
author | Jon Reid | 2012-04-13 12:03:12 -0700 |
---|---|---|
committer | Jon Reid | 2012-04-13 12:03:12 -0700 |
commit | 96f78dec0e8ddd9ad975ec8150733f4945ff9095 (patch) | |
tree | e7b7f7c768fde197397ee358a4d273ebdae23f46 /js | |
parent | 3d4ead0171ebdf9334a5baabec26929ad45458a9 (diff) | |
download | ninja-96f78dec0e8ddd9ad975ec8150733f4945ff9095.tar.gz |
Timeline: Bug fix: problem with editing layers missing last letter in new
value.
Diffstat (limited to 'js')
-rw-r--r-- | js/components/editable.reel/editable.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js index ca65bc2a..dad93b31 100644 --- a/js/components/editable.reel/editable.js +++ b/js/components/editable.reel/editable.js | |||
@@ -38,6 +38,7 @@ exports.Editable = Montage.create(Component, { | |||
38 | set : function(el) { | 38 | set : function(el) { |
39 | this._element = el; | 39 | this._element = el; |
40 | this._element.addEventListener('keydown', this, false); | 40 | this._element.addEventListener('keydown', this, false); |
41 | this._element.addEventListener('keyup', this, false); | ||
41 | this._element.addEventListener('input', this, false); | 42 | this._element.addEventListener('input', this, false); |
42 | 43 | ||
43 | if(this.startOnEvent) { | 44 | if(this.startOnEvent) { |
@@ -192,11 +193,13 @@ exports.Editable = Montage.create(Component, { | |||
192 | handleKeydown : { | 193 | handleKeydown : { |
193 | value : function(e) { | 194 | value : function(e) { |
194 | var k = e.keyCode; | 195 | var k = e.keyCode; |
195 | 196 | } | |
196 | // Record change | 197 | }, |
198 | |||
199 | handleKeyup : { | ||
200 | value : function(e) { | ||
201 | // Record change in value | ||
197 | this.enteredValue = this._element.firstChild.data; | 202 | this.enteredValue = this._element.firstChild.data; |
198 | |||
199 | //console.log('keyCode: ' + k); | ||
200 | } | 203 | } |
201 | }, | 204 | }, |
202 | ///// Text input has changed values | 205 | ///// Text input has changed values |