diff --git a/src/extensions/default/InlineColorEditor/InlineColorEditor.js b/src/extensions/default/InlineColorEditor/InlineColorEditor.js
index <HASH>..<HASH> 100644
--- a/src/extensions/default/InlineColorEditor/InlineColorEditor.js
+++ b/src/extensions/default/InlineColorEditor/InlineColorEditor.js
@@ -150,16 +150,16 @@ define(function (require, exports, module) {
 
             // Don't push the change back into the host editor if it came from the host editor.
             if (!this._isHostChange) {
+                this._isOwnChange = true;
                 this.hostEditor.document.batchOperation(function () {
                     // Replace old color in code with the picker's color, and select it
-                    self._isOwnChange = true;
                     self.hostEditor.document.replaceRange(colorString, range.start, range.end, self._origin);
-                    self._isOwnChange = false;
                     self.hostEditor.setSelection(range.start, {
                         line: range.start.line,
                         ch: range.start.ch + colorString.length
                     });
                 });
+                this._isOwnChange = false;
             }
             
             this._color = colorString;
Prevent InlineColorEditor's own changes from changing input values