Bug
The Sort, Per Page, and Type filter dropdowns on the /shows page open at the wrong
screen position if the user has scrolled down before clicking them.
Steps to Reproduce
- Go to /shows
- Scroll down the page
- Click any of the filter buttons (Type, Per Page, Sort)
Expected
Dropdown opens directly below the button that was clicked.
Actual
Dropdown appears offset — anchored to where the button was when the page first loaded,
not its current viewport position.
Root Cause
src/actions/anchor.ts calculates button position via getBoundingClientRect() but
only recalculates on resize and ResizeObserver — never when the popover opens.
After scrolling, the cached position is stale.
Fix
Listen for the popover toggle event and recalculate position when newState === 'open'.
Bug
The Sort, Per Page, and Type filter dropdowns on the /shows page open at the wrong
screen position if the user has scrolled down before clicking them.
Steps to Reproduce
Expected
Dropdown opens directly below the button that was clicked.
Actual
Dropdown appears offset — anchored to where the button was when the page first loaded,
not its current viewport position.
Root Cause
src/actions/anchor.tscalculates button position viagetBoundingClientRect()butonly recalculates on
resizeandResizeObserver— never when the popover opens.After scrolling, the cached position is stale.
Fix
Listen for the popover
toggleevent and recalculate position whennewState === 'open'.