Repository navigation
Commit e57ccc5
committed
Gallery: the Astro component hydrates again after a view-transition navigation
Under Astro's ClientRouter the component's script runs once per document, so a gallery on the next
page stayed dead. It now hydrates on astro:page-load too (hydrate ignores a gallery it already has)
and destroys the old page's galleries on astro:before-swap, so their listeners don't leak.1 parent bf7cdbb commit e57ccc5
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
25 | 36 | | |
0 commit comments