Skip to content

Commit 1bc753c

Browse files
committed
do not auto-update via firebase when in edit mode. fixes ondras#57
1 parent 4641b35 commit 1bc753c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

my-mind.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,8 @@ MM.Item.prototype.fromJSON = function(data) {
396396

397397
MM.Item.prototype.mergeWith = function(data) {
398398
var dirty = 0;
399-
if (this.getText() != data.text) { this.setText(data.text); }
399+
400+
if (this.getText() != data.text && !this._dom.text.contentEditable) { this.setText(data.text); }
400401

401402
if (this._side != data.side) {
402403
this._side = data.side;

src/item.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ MM.Item.prototype.fromJSON = function(data) {
107107

108108
MM.Item.prototype.mergeWith = function(data) {
109109
var dirty = 0;
110-
if (this.getText() != data.text) { this.setText(data.text); }
110+
111+
if (this.getText() != data.text && !this._dom.text.contentEditable) { this.setText(data.text); }
111112

112113
if (this._side != data.side) {
113114
this._side = data.side;

0 commit comments

Comments
 (0)