@@ -264,11 +264,13 @@ describe('undo/redo', () => {
264
264
const startSelectionA = {
265
265
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 5 } ,
266
266
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 5 } ,
267
+ backward : false ,
267
268
}
268
269
await editorA . setSelection ( startSelectionA )
269
270
const startSelectionB = {
270
271
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 11 } ,
271
272
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 11 } ,
273
+ backward : false ,
272
274
}
273
275
await editorB . setSelection ( startSelectionB )
274
276
await editorA . insertText ( '123' )
@@ -366,11 +368,13 @@ describe('undo/redo', () => {
366
368
const startSelectionA = {
367
369
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 5 } ,
368
370
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 5 } ,
371
+ backward : false ,
369
372
}
370
373
await editorA . setSelection ( startSelectionA )
371
374
const startSelectionB = {
372
375
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 18 } ,
373
376
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 18 } ,
377
+ backward : false ,
374
378
}
375
379
await editorB . setSelection ( startSelectionB )
376
380
await editorB . pressKey ( 'Backspace' )
@@ -448,6 +452,7 @@ describe('undo/redo', () => {
448
452
const desiredSelectionA = {
449
453
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 18 } ,
450
454
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 18 } ,
455
+ backward : false ,
451
456
}
452
457
await editorA . setSelection ( desiredSelectionA )
453
458
await editorA . pressKey ( 'Enter' )
@@ -539,11 +544,13 @@ describe('undo/redo', () => {
539
544
const startSelectionA = {
540
545
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 5 } ,
541
546
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 5 } ,
547
+ backward : false ,
542
548
}
543
549
await editorA . setSelection ( startSelectionA )
544
550
const startSelectionB = {
545
551
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 11 } ,
546
552
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 11 } ,
553
+ backward : false ,
547
554
}
548
555
await editorB . setSelection ( startSelectionB )
549
556
await editorA . insertText ( '123' )
@@ -622,6 +629,7 @@ describe('undo/redo', () => {
622
629
},
623
630
],
624
631
},
632
+ "backward": false,
625
633
"focus": Object {
626
634
"offset": 8,
627
635
"path": Array [
@@ -651,6 +659,7 @@ describe('undo/redo', () => {
651
659
},
652
660
],
653
661
},
662
+ "backward": false,
654
663
"focus": Object {
655
664
"offset": 14,
656
665
"path": Array [
@@ -689,11 +698,13 @@ describe('undo/redo', () => {
689
698
const startSelectionA = {
690
699
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 5 } ,
691
700
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 5 } ,
701
+ backward : false ,
692
702
}
693
703
await editorA . setSelection ( startSelectionA )
694
704
const startSelectionB = {
695
705
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 11 } ,
696
706
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 11 } ,
707
+ backward : false ,
697
708
}
698
709
await editorB . setSelection ( startSelectionB )
699
710
await editorA . pressKey ( '1' )
@@ -853,11 +864,13 @@ describe('undo/redo', () => {
853
864
const startSelectionA = {
854
865
anchor : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 1 } ,
855
866
focus : { path : [ { _key : 'randomKey0' } , 'children' , { _key : 'randomKey1' } ] , offset : 1 } ,
867
+ backward : false ,
856
868
}
857
869
await editorA . setSelection ( startSelectionA )
858
870
const startSelectionB = {
859
871
anchor : { path : [ { _key : 'randomKey2' } , 'children' , { _key : 'randomKey3' } ] , offset : 1 } ,
860
872
focus : { path : [ { _key : 'randomKey2' } , 'children' , { _key : 'randomKey3' } ] , offset : 1 } ,
873
+ backward : false ,
861
874
}
862
875
await editorB . setSelection ( startSelectionB )
863
876
await editorA . pressKey ( 'a' )
@@ -1060,6 +1073,7 @@ describe('undo/redo', () => {
1060
1073
const desiredSelectionA = {
1061
1074
anchor : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : 0 } ,
1062
1075
focus : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : 0 } ,
1076
+ backward : false ,
1063
1077
}
1064
1078
const p1Prefix = 'Paragraph 1: '
1065
1079
await editorA . setSelection ( desiredSelectionA )
@@ -1146,6 +1160,7 @@ describe('undo/redo', () => {
1146
1160
const desiredSelectionA = {
1147
1161
anchor : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : 0 } ,
1148
1162
focus : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : 0 } ,
1163
+ backward : false ,
1149
1164
}
1150
1165
const p1Prefix = 'Paragraph 1: '
1151
1166
await editorA . setSelection ( desiredSelectionA )
@@ -1242,6 +1257,7 @@ describe('undo/redo', () => {
1242
1257
const desiredSelectionA = {
1243
1258
anchor : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : charOffset } ,
1244
1259
focus : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : charOffset } ,
1260
+ backward : false ,
1245
1261
}
1246
1262
await editorA . setSelection ( desiredSelectionA )
1247
1263
await editorA . pressKey ( 'Backspace' )
@@ -1296,6 +1312,7 @@ describe('undo/redo', () => {
1296
1312
const desiredSelectionA = {
1297
1313
anchor : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : charOffset } ,
1298
1314
focus : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : charOffset } ,
1315
+ backward : false ,
1299
1316
}
1300
1317
await editorA . setSelection ( desiredSelectionA )
1301
1318
await editorA . pressKey ( 'Backspace' )
@@ -1350,6 +1367,7 @@ describe('undo/redo', () => {
1350
1367
const desiredSelectionA = {
1351
1368
anchor : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : charOffset } ,
1352
1369
focus : { path : [ { _key : 'blockA' } , 'children' , { _key : 'spanA' } ] , offset : charOffset } ,
1370
+ backward : false ,
1353
1371
}
1354
1372
await editorA . setSelection ( desiredSelectionA )
1355
1373
await editorA . pressKey ( 'Backspace' )
0 commit comments