aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2020-10-22 22:46:03 +0800
committerGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2020-10-22 22:46:03 +0800
commite6932e78e54457391a07e70bc85fc1f4f792e22f (patch)
tree16fada9f02d83d6e2cbfce1e3d566d663219ae93 /src
parent11891ceacc7a1640dcb62dafac81b1acd040f333 (diff)
presBox
restoring undoBatch for remove docs
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/PresBox.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx
index 39e1ec58b..80cf848e5 100644
--- a/src/client/views/nodes/PresBox.tsx
+++ b/src/client/views/nodes/PresBox.tsx
@@ -690,14 +690,14 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
switch (e.key) {
case "Backspace":
if (this.layoutDoc.presStatus === "edit") {
- runInAction(() => {
+ undoBatch(action(() => {
for (const doc of this._selectedArray) {
this.removeDocument(doc);
}
this._selectedArray = [];
this._eleArray = [];
this._dragArray = [];
- });
+ }))();
handled = true;
}
break;
@@ -1827,7 +1827,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
</div>
</Tooltip>
<div className="toolbar-divider" />
- <Tooltip title={<><div className="dash-tooltip">{presKeyEvents ? "Key events are active" : "Keys are not active - click anywhere on the presentation trail to activate keys"}</div></>}>
+ <Tooltip title={<><div className="dash-tooltip">{presKeyEvents ? "Key are active" : "Keys are not active - click anywhere on the presentation trail to activate keys"}</div></>}>
<div className="toolbar-button" style={{ cursor: 'default', position: 'absolute', right: 30, fontSize: 16 }}>
<FontAwesomeIcon className={"toolbar-thumbtack"} icon={"keyboard"} style={{ color: presKeyEvents ? '#AEDDF8' : 'white' }} />
</div>