feedback
feedback copied to clipboard
Sticky header covers scroll targets
Describe the bug
When a notebook contains edits, Observable sticks the notebook menu bar to to the top of the viewport.
This bar covers jump targets (anchors, search results) and thus several impedes navigation and orientation within a notebook.
Expected behavior
Scrolling to elements is offset by the height of the sticky bar.
Additional context
This is an longstanding problem that has likely been touched on in other issues as well.
Workaround
Add a user style sheet with the following content:
@-moz-document url-prefix("https://observablehq.com/") {
#__next div[data-node-id], .cm-content > div {
scroll-margin-top: 52px;
scroll-margin-bottom: 52px;
}
}
This also fixes the scrolling issue described in https://github.com/observablehq/feedback/issues/291#issuecomment-1079665613.
Edit: Does not work for jumps from cell references to viewof cells.
@mootari Could you attach an example video of this problem. I can't seem to reproduce it (see video clip)
https://user-images.githubusercontent.com/10869236/163855361-a1e3f8f1-a7d0-4719-9521-68521710ce32.mov
.
Cobus, we fixed this recently.
@CobusT It's fixed for search results, but still a problem for anchors:
- Go to https://observablehq.com/@ambassadors/input-history@2582
- In the first cell output, look for the line that says "Go to: inputHistory, statesWidget, Changelog, Todos"
- Click either "inputHistory" or "statesWidget"
This is still an issue for anchors.
I think this has been fixed by the new implementation of the sticky headers. Please re-open if this is not the case. I cannot reproduce.
Sticky headers still cover the target: