Commit 51a4d00
committed
Scope htmx history to .main-container so menu survives Back
Previously, htmx cached the entire HTML body for browser back-and-forth
navigation. On a history-cache miss (for example, after a historyCacheError
caused by exceeding the localStorage quota), it re-fetches the page.
However, for htmx requests, this re-fetch omits the top menu, effectively
wiping it.
Mark .main-container with hx-history-elt so htmx caches and restores only
the content area. This also reduces the localStorage quota pressure.
Since historyElt is limited to .main-container, it no longer contains
.ck-body-wrapper. The cleanup is redundant anyway, as fa61ab1 fixed the
underlying CKEditor teardown.1 parent a019b28 commit 51a4d00
2 files changed
Lines changed: 4 additions & 3 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | | - | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
0 commit comments