Commit 7ffe995
fix: restore accessibilityViewIsModal after nested modal dismiss
Three issues caused the remaining modal's ContainerView to be left with
accessibilityViewIsModal = false after a nested modal dismisses:
1. The flag assignment used allPresentations (includes exiting
presentations) instead of presentations(includeExiting: false).
2. The flag assignment was gated behind an early-return guard that
bails when the top layer hasn't changed — which is exactly the case
when dismissing back to the same top modal.
3. remove(presentation:) never re-evaluated the flag after removing
the exiting presentation from allPresentations.
Fix: move the flag assignment above the guard so it runs
unconditionally, use the filtered presentation list, and call
updateAccessibilityViewIsModal() from remove(presentation:).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d0306d5 commit 7ffe995
1 file changed
Lines changed: 17 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
473 | 484 | | |
474 | 485 | | |
475 | 486 | | |
476 | 487 | | |
477 | 488 | | |
478 | 489 | | |
| 490 | + | |
479 | 491 | | |
480 | 492 | | |
481 | 493 | | |
| |||
486 | 498 | | |
487 | 499 | | |
488 | 500 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | 501 | | |
506 | 502 | | |
507 | 503 | | |
| |||
762 | 758 | | |
763 | 759 | | |
764 | 760 | | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
765 | 766 | | |
766 | 767 | | |
767 | 768 | | |
| |||
0 commit comments