levineuwirth.org/static/js
Levi Neuwirth 76bda7af13 Popups: always clamp into the viewport
positionPopup clamped horizontally but never vertically: the
flip-above branch positioned tall popups (rich layouts, lead figures)
above the visible region whenever the target sat near the top of the
screen. Placement is now: below if it fits, above if THAT fits, else
the roomier side — then clamped into the viewport on both axes.
.link-popup is additionally capped at viewport height (matching GAP,
overflow-y: auto) so the clamp always has room to work, and a
dimension-less image that loads after positioning re-clamps instead of
growing past the edge.

Verified by simulating the clamp across five viewport scenarios: the
near-top bug case moves from 470px above the viewport to fully
visible; the fits-below and flip-above cases are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 13:14:14 -04:00
..
annotations.js Frontend tail: keyboard access, idempotence, input edge cases 2026-06-10 11:25:19 -04:00
collapse.js Frontend tail: keyboard access, idempotence, input edge cases 2026-06-10 11:25:19 -04:00
copy.js Frontend tail: keyboard access, idempotence, input edge cases 2026-06-10 11:25:19 -04:00
gallery.js Frontend tail: keyboard access, idempotence, input edge cases 2026-06-10 11:25:19 -04:00
katex-bootstrap.js audit: frontend a11y, JS shared utils, CSS variable definitions 2026-04-10 17:41:21 -04:00
lightbox.js Frontend: search races, lightbox a11y, popup edge cases 2026-06-10 09:43:25 -04:00
list-pagination.js Navigation refactor 2026-04-19 14:35:41 -04:00
nav.js Frontend: search races, lightbox a11y, popup edge cases 2026-06-10 09:43:25 -04:00
now.js Add now.js: recompute "Last updated" relative phrase client-side 2026-05-23 12:06:49 -04:00
photography-map.js Spec dilemma 2026-05-01 21:22:01 -04:00
photography-modes.js Spec dilemma 2026-05-01 21:22:01 -04:00
popups.js Popups: always clamp into the viewport 2026-06-10 13:14:14 -04:00
prism.min.js initial deploy! whoop 2026-03-17 21:56:14 -04:00
random.js affiliation, cabal helper script 2026-03-26 08:14:50 -04:00
reading.js initial deploy! whoop 2026-03-17 21:56:14 -04:00
score-reader.js Frontend tail: keyboard access, idempotence, input edge cases 2026-06-10 11:25:19 -04:00
search-filters.js Frontend tail: keyboard access, idempotence, input edge cases 2026-06-10 11:25:19 -04:00
search.js Frontend: search races, lightbox a11y, popup edge cases 2026-06-10 09:43:25 -04:00
selection-popup.js Frontend tail: keyboard access, idempotence, input edge cases 2026-06-10 11:25:19 -04:00
semantic-search.js Frontend: search races, lightbox a11y, popup edge cases 2026-06-10 09:43:25 -04:00
settings.js yum cappuccino yay! 2026-05-03 21:16:58 -04:00
sidenotes.js mobile fixes 2026-04-12 15:29:35 -04:00
theme.js yum cappuccino yay! 2026-05-03 21:16:58 -04:00
toc.js mobile fixes 2026-04-12 15:29:35 -04:00
transclude.js Frontend tail: keyboard access, idempotence, input edge cases 2026-06-10 11:25:19 -04:00
utils.js audit: frontend a11y, JS shared utils, CSS variable definitions 2026-04-10 17:41:21 -04:00
viz.js Fix audit frontend MEDs 2026-06-10 09:21:47 -04:00