aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-09-09 23:49:13 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-09-09 23:49:13 -0400
commit149fa3116cdbb58f2eed144cc0bb90c1b1cd2b2a (patch)
tree14794178ad7b79183e3d40b1d4ee010b257e2919
parenta1e08c0be1a1067232ea71ed3344ce44d9522bf7 (diff)
fixed footnote saving
-rw-r--r--src/client/util/RichTextSchema.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 5081c81d8..3def4a579 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -757,10 +757,11 @@ export class FootnoteView {
this.innerView.updateState(state);
if (!tr.getMeta("fromOutside")) {
- let outerTr = this.outerView.state.tr, offsetMap = StepMap.offset(this.getPos() + 1);
- for (let steps of transactions) {
- for (let step of steps) {
- outerTr.step(step.map(offsetMap));
+ let outerTr = this.outerView.state.tr, offsetMap = StepMap.offset(this.getPos() + 1)
+ for (let i = 0; i < transactions.length; i++) {
+ let steps = transactions[i].steps;
+ for (let j = 0; j < steps.length; j++) {
+ outerTr.step(steps[j].map(offsetMap));
}
}
if (outerTr.docChanged) this.outerView.dispatch(outerTr);