fix(dropdown): stop table wrapper clipping the device dropdown (#39)#59
Merged
Conversation
The device/status dropdown menu is absolutely positioned inside the session list's overflow-x-auto wrapper. Because overflow-x:auto forces overflow-y:auto, a menu taller than a short table was clipped (issue #39). Open the menu with position:fixed anchored to its toggle so it escapes the clipping ancestor, bound it to the viewport with an internal scroll, flip it up when there is more room above, and reposition on scroll/resize while open. Fixes #39. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Staging deployment: https://timetracker-staging-fix-issue-39-dropdown-clipped.fly.dev |
KucharczykL
added a commit
that referenced
this pull request
Jun 20, 2026
fix(dropdown): flip-up menu collapses off-screen (follow-up to #59)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #39.
Problem
The device (and game-status) dropdown menu is absolutely positioned inside the session list's
.overflow-x-autowrapper.overflow-x: autoforcesoverflow-y: auto, so when the menu is taller than a short table it gets clipped/cut off.Measured before fix (1 row, 15 devices, 1280×800): menu
position:absolute, bottom 528px below the wrapper's clip edge → cut off.Fix
In
initDropdown(ts/elements/dropdown.ts, shared by device + status selectors), open the menu withposition: fixedanchored to its toggle so it escapes the clipping ancestor:fixedtop/left from the toggle'sgetBoundingClientRect(), width matched to the toggle.max-height+ internaloverflow-y: auto.After fix: menu
position:fixed,max-height:479px, fully within the viewport.Tests
e2e/test_dropdown_clipping_e2e.py: opens the dropdown on a short table with a tall device list, asserts the menu isfixedand within the viewport, and selects a previously-clipped option (Device 14) successfully.make checkgreen (535 tests).🤖 Generated with Claude Code