aboutsummaryrefslogtreecommitdiff
path: root/src/fields/util.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-02-08 19:25:48 -0500
committerbobzel <zzzman@gmail.com>2021-02-08 19:25:48 -0500
commit0e5891eab7f53697b764b7e9da5163db0351a0a2 (patch)
tree41f0b00acf4cf31ad6dee451612d4f4b6f870133 /src/fields/util.ts
parent32a0d5be4ff7a49b554806c27dca5b63ea80277f (diff)
overhaul of link anchors on text boxes to use actual Documents to represent selected text. Also got rid of _scrollY and _scrollPreviewY so that all document regions can be focused on using focus() and the new scrollFocus() mechanisim
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r--src/fields/util.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts
index ecb3fb343..b9c5a13c1 100644
--- a/src/fields/util.ts
+++ b/src/fields/util.ts
@@ -1,5 +1,5 @@
import { UndoManager } from "../client/util/UndoManager";
-import { Doc, FieldResult, UpdatingFromServer, LayoutSym, AclPrivate, AclEdit, AclReadonly, AclAddonly, AclSym, DataSym, DocListCast, AclAdmin, HeightSym, WidthSym, updateCachedAcls, AclUnset, DocListCastAsync } from "./Doc";
+import { Doc, FieldResult, UpdatingFromServer, LayoutSym, AclPrivate, AclEdit, AclReadonly, AclAddonly, AclSym, DataSym, DocListCast, AclAdmin, HeightSym, WidthSym, updateCachedAcls, AclUnset, DocListCastAsync, ForceServerWrite } from "./Doc";
import { SerializationHelper } from "../client/util/SerializationHelper";
import { ProxyField, PrefetchProxy } from "./Proxy";
import { RefField } from "./RefField";
@@ -96,7 +96,7 @@ const _setterImpl = action(function (target: any, prop: string | symbol | number
} else {
DocServer.registerDocWithCachedUpdate(receiver, prop as string, curValue);
}
- !receiver[UpdatingFromServer] && UndoManager.AddEvent({
+ (!receiver[UpdatingFromServer] || receiver[ForceServerWrite]) && UndoManager.AddEvent({
redo: () => receiver[prop] = value,
undo: () => receiver[prop] = curValue
});