Skip to content

Fix preview panel resize soft lock - #2255

Open
Glubus wants to merge 1 commit into
ebkr:developfrom
Glubus:fix/preview-panel-pointer-resize
Open

Fix preview panel resize soft lock#2255
Glubus wants to merge 1 commit into
ebkr:developfrom
Glubus:fix/preview-panel-pointer-resize

Conversation

@Glubus

@Glubus Glubus commented Aug 12, 2026

Copy link
Copy Markdown

Summary

Fixes a UI soft lock that can occur when resizing the online mod preview panel, particularly on Linux/Wayland.

Root cause

The preview panel separator used the native HTML d&d API (draggable and drag events) as a resize mechanism.

On Electron under Wayland, moving the separator could leave the application inside the native d&d interaction. The UI would then stop responding after the panel moved beneath the pointer.

Changes

  • Replace native HTML drag-and-drop with pointer events.
  • Use pointer capture to keep receiving move and release events during resizing.
  • Handle pointer cancellation and lost pointer capture.
  • Clamp the panel width to the available layout bounds.
  • Prevent invalid panel widths from being persisted.
  • Add unit tests for the width-clamping behavior.

Testing

  • pnpm typecheck
  • pnpm exec vitest run test/vitest/tests/utils/PreviewPanelResizeUtils.spec.ts
  • Manually reproduced and verified on EndeavourOS with KDE Wayland.
  • Tested using the Risk of Rain 2 online mod preview panel.
Enregistrement.d.ecran_20260812_113303.webm

@CLAassistant

CLAassistant commented Aug 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants