aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Guzman2012-05-17 19:52:09 -0700
committerEric Guzman2012-05-17 19:52:09 -0700
commit8f2d3226220d83dff5f2dd7463aede02de8e31be (patch)
tree89c8d288a2616701fc25aa83e3940d532b4ff663
parent458a4598ed64e3d8c6010a216fb7fb4b3c3c87e7 (diff)
downloadninja-8f2d3226220d83dff5f2dd7463aede02de8e31be.tar.gz
Editable - Trigger change event after stop event
-rw-r--r--js/components/editable.reel/editable.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js
index b385d916..a6350359 100644
--- a/js/components/editable.reel/editable.js
+++ b/js/components/editable.reel/editable.js
@@ -140,15 +140,14 @@ exports.Editable = Montage.create(Component, {
140 value: function(eventData) { 140 value: function(eventData) {
141 this._isEditable = this._element.contentEditable = false; 141 this._isEditable = this._element.contentEditable = false;
142 this._element.classList.remove(this.editingClass); 142 this._element.classList.remove(this.editingClass);
143
144 this._sendEvent('stop', eventData);
145
146 document.removeEventListener('mousedown', this, false);
147 143
148 ///// if value is different than pre-edit val, call onchange method 144 ///// if value is different than pre-edit val, call onchange method
149 if(this._preEditValue !== this.value) { 145 if(this._preEditValue !== this.value) {
150 this._sendEvent('change'); 146 this._sendEvent('change');
151 } 147 }
148
149 this._sendEvent('stop', eventData);
150 document.removeEventListener('mousedown', this, false);
152 } 151 }
153 }, 152 },
154 selectAll : { 153 selectAll : {