Commit 1baa45c
fix(modal): sub-anchor click no longer closes the umbrella modal
Sub-anchor links render as <a href="#" data-sub-anchor>, which were also
matched by the AsciiDoc cross-reference handler (a[href^="#"]). Clicking a
sub-anchor therefore fired both its own handler AND a bogus
navigate('/anchor/') with an empty id. Harmless before, but since the
modal now closes when a non-anchor route resolves (#565), handleRoute
normalizes '/anchor/' → '/anchor' (not an anchor route) and closed the
umbrella modal — breaking the "navigate to sub-anchor / show back button"
E2E tests.
Exclude data-sub-anchor links from the cross-reference handler and ignore
empty ids, so sub-anchor clicks only load the sub-anchor and the modal +
back button stay put.
Verified: full E2E suite (35) green locally, incl. the two umbrella tests
that regressed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 55ce9e7 commit 1baa45c
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
294 | 297 | | |
295 | | - | |
| 298 | + | |
296 | 299 | | |
297 | 300 | | |
| 301 | + | |
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
| |||
0 commit comments