Commit ef620e0
committed
test(editor): exercise RAF scroll-restore callback in focus wrapping test
The previous test only verified that requestAnimationFrame was
scheduled but never invoked the callback. Now we capture the RAF
callback, simulate async scroll drift (scrollY changing between
focus call and RAF execution), and verify scrollTo is called to
restore the original position.1 parent 88c0773 commit ef620e0
1 file changed
Lines changed: 17 additions & 4 deletions
File tree
- packages/super-editor/src/core/presentation-editor/tests
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
367 | 373 | | |
| 374 | + | |
368 | 375 | | |
369 | 376 | | |
370 | | - | |
371 | 377 | | |
372 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
373 | 386 | | |
374 | 387 | | |
375 | 388 | | |
| |||
0 commit comments