Commit d58c632
committed
fix(review-editor/mobile): reset scroll after iOS keyboard dismisses
After saving or cancelling an annotation, iOS Safari was leaving a
phantom scroll offset under the app — the keyboard had pushed the
focused textarea into view and the offset wasn't reverting on close.
Two changes:
- Outer shell uses position: fixed inset-0 instead of h-[100dvh] so
the document itself can't scroll regardless of what iOS does with
the visual viewport.
- New closeAnnotationSheet helper blurs the active element (releases
the keyboard) and resets window.scrollTo(0,0) on the next frame.
Wired to both Cancel and Save paths.1 parent d522789 commit d58c632
1 file changed
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
523 | 535 | | |
524 | 536 | | |
525 | 537 | | |
526 | 538 | | |
527 | 539 | | |
528 | 540 | | |
529 | 541 | | |
530 | | - | |
| 542 | + | |
531 | 543 | | |
532 | | - | |
| 544 | + | |
533 | 545 | | |
534 | 546 | | |
535 | 547 | | |
536 | 548 | | |
537 | 549 | | |
538 | | - | |
| 550 | + | |
539 | 551 | | |
540 | 552 | | |
541 | 553 | | |
| |||
703 | 715 | | |
704 | 716 | | |
705 | 717 | | |
706 | | - | |
| 718 | + | |
707 | 719 | | |
708 | 720 | | |
709 | 721 | | |
| |||
0 commit comments