Skip to content

fix: keep scroll position on scroll lock - #2101

Merged
netomi merged 3 commits into
eclipse-openvsx:mainfrom
gnugomez:gnugomez/main/fix-download-popup
Aug 26, 2026
Merged

netomi merged 3 commits into
eclipse-openvsx:mainfrom
gnugomez:gnugomez/main/fix-download-popup

Conversation

@gnugomez

Copy link
Copy Markdown
Member

Fixes #2100

@gnugomez
gnugomez requested a review from netomi August 26, 2026 10:00

@netomi netomi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, minimal fix for the underlying scroll-reset issue (moving body from height: 100% to min-height: 100% so <html> stays the document's scrolling element once MUI toggles overflow: hidden on <body>). Two things worth a look before merging:

  • No test and no stated exception for this behavioral change. webui/CLAUDE.md asks that every behavioral change ship with a unit test, or explicitly invoke the "pure styling/config with no testable surface" exception rather than skipping silently. This is a real behavioral fix (not decorative styling), so it'd be good to either add a regression test if one's feasible, or note explicitly that it's exempt.

Comment thread webui/src/main.css Resolved
Fixes the behavior reported in a comment on eclipse-openvsx#2100: each target-platform
option in the extension detail page's download menu was rendered as an
inline <a> wrapping only its text, nested inside a MenuItem that had no
click handler and cursor: auto (explicitly disabling its own clickable
affordance). MUI's Link renders as an inline element, so only the
option's text itself was ever clickable - clicking anywhere else in the
row (which is what the menu visually offers) did nothing.

Fix it the same way the same bug class was already fixed for the
avatar/user menu: make the MenuItem itself the anchor via MUI's
`component` prop, so its row-filling click target and href cover the
whole option, not just its text.

Adds a regression test (verified fail-first against the reverted fix)
and a changelog entry.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes UI scroll-jump behavior triggered by scroll-lock (e.g., when opening menus/dialogs) and improves the extension download menu’s click target so each platform row behaves like a proper full-width link.

Changes:

  • Update the extension detail downloads menu so each MenuItem is rendered as the anchor/link (full-row clickable).
  • Adjust global CSS (html/body) to preserve scroll position when scroll-lock is applied (prevents jumping to top).
  • Add a regression unit test covering the downloads menu link semantics and close behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
webui/test/unit/pages/extension-detail/extension-detail-downloads-menu.spec.tsx Adds regression tests for the downloads menu’s link semantics and close behavior.
webui/src/pages/extension-detail/extension-detail-downloads-menu.tsx Renders each download menu row as the link component itself (full-row clickable).
webui/src/main.css Tweaks html/body sizing/overflow to prevent scroll position reset during scroll-lock.
webui/CHANGELOG.md Documents the scroll-jump fix and the downloads menu interaction fix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Thomas Neidhart <thomas.neidhart@gmail.com>
@netomi
netomi merged commit b5b41ac into eclipse-openvsx:main Aug 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clicking the download button results in weird behavior

3 participants