Commit b83dc88
committed
Fix sidebar auto-scroll to correctly target scrollable container
- Use closest() to find the actual scrollable UL container
- Calculate position relative to the scrollable container, not the sidebar
- Use getBoundingClientRect() for accurate positioning
- Position active link near the top with 20px padding for visibility
- Fixes issue where scroll didn't work correctly for Develop/Operate/Integrate
- Fixes Commands section scrolling too far
This improves the previous implementation by targeting the correct
overflow-y-auto UL element that actually scrolls, rather than trying
to scroll the sidebar nav element itself.1 parent c55453e commit b83dc88
File tree
1 file changed
+21
-0
lines changed- layouts/partials
1 file changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
207 | 228 | | |
208 | 229 | | |
209 | 230 | | |
| |||
0 commit comments