Commit cae32c5
Preserve mode query param when navigating from links on proxied pages
ldh:DocumentNavigate dropped every query param other than uri when unwrapping
a proxied href. Clicking ReadMode in the bs2:ModeList dropdown on
?uri=external&mode=X pushed ?uri=external (no mode), so ac:mode($results)
fell through to content-block detection and the page snapped back to
ContentMode. Local URLs were unaffected because their mode rides inside
$uri itself.
Add a $query-params parameter to ldh:DocumentNavigate threaded into
ldh:href, and pass map:remove($query-params, 'uri') from both the link
click handler and the popstate handler so back/forward also preserves
the mode after a switch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 94bc699 commit cae32c5
1 file changed
Lines changed: 5 additions & 2 deletions
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
| 786 | + | |
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
| |||
794 | 795 | | |
795 | 796 | | |
796 | 797 | | |
797 | | - | |
| 798 | + | |
798 | 799 | | |
799 | 800 | | |
800 | 801 | | |
| |||
877 | 878 | | |
878 | 879 | | |
879 | 880 | | |
| 881 | + | |
880 | 882 | | |
881 | 883 | | |
882 | 884 | | |
883 | 885 | | |
884 | | - | |
| 886 | + | |
885 | 887 | | |
886 | 888 | | |
887 | 889 | | |
| |||
895 | 897 | | |
896 | 898 | | |
897 | 899 | | |
| 900 | + | |
898 | 901 | | |
899 | 902 | | |
900 | 903 | | |
| |||
0 commit comments