Bug 1175833 - Propagate editMode state change upon context data save up the components tree. r=Standard8, a=lmandel
☠☠ backed out by 2c00fffa992e ☠ ☠
authorMike de Boer <mdeboer@mozilla.com>
Wed, 22 Jul 2015 15:08:08 +0200
changeset 275433 32b26ad5041a8e7b1d6d0610fd31f126cc6bcfbd
parent 275432 2ba79d8f2c61afcfc6fb8865014cc6ba3b70c811
child 275434 9d94a46797516d18e66b3bb7d22dd50e6b190710
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, lmandel
bugs1175833
milestone40.0
Bug 1175833 - Propagate editMode state change upon context data save up the components tree. r=Standard8, a=lmandel
browser/components/loop/content/js/roomViews.js
browser/components/loop/content/js/roomViews.jsx
--- a/browser/components/loop/content/js/roomViews.js
+++ b/browser/components/loop/content/js/roomViews.js
@@ -343,16 +343,19 @@ loop.roomViews = (function(mozL10n) {
         }
       }
 
       // Make sure we do not show the edit-mode when we just successfully saved
       // context.
       if (this.props.savingContext && nextProps.savingContext !== this.props.savingContext &&
         !nextProps.error && this.state.editMode) {
         newState.editMode = false;
+        if (this.props.onEditModeChange) {
+          this.props.onEditModeChange(false);
+        }
       }
 
       if (Object.getOwnPropertyNames(newState).length) {
         this.setState(newState);
       }
     },
 
     getDefaultProps: function() {
--- a/browser/components/loop/content/js/roomViews.jsx
+++ b/browser/components/loop/content/js/roomViews.jsx
@@ -343,16 +343,19 @@ loop.roomViews = (function(mozL10n) {
         }
       }
 
       // Make sure we do not show the edit-mode when we just successfully saved
       // context.
       if (this.props.savingContext && nextProps.savingContext !== this.props.savingContext &&
         !nextProps.error && this.state.editMode) {
         newState.editMode = false;
+        if (this.props.onEditModeChange) {
+          this.props.onEditModeChange(false);
+        }
       }
 
       if (Object.getOwnPropertyNames(newState).length) {
         this.setState(newState);
       }
     },
 
     getDefaultProps: function() {