Skip to content

fix(_desktop): allow shrinking the Desktop canvas surface#1694

Open
King0James0 wants to merge 1 commit into
agent0ai:mainfrom
King0James0:fix/desktop-canvas-shrink-pointer-events
Open

fix(_desktop): allow shrinking the Desktop canvas surface#1694
King0James0 wants to merge 1 commit into
agent0ai:mainfrom
King0James0:fix/desktop-canvas-shrink-pointer-events

Conversation

@King0James0

Copy link
Copy Markdown

Fixes #1693.

The Desktop Canvas surface can be dragged wider but not narrower — shrinking with the resize handle freezes.

Cause: the live desktop renders in <iframe class="office-desktop-frame">. Canvas resize is driven by a global pointermove from the left-edge handle; shrinking sweeps the cursor across the iframe, which captures the event and freezes the drag. Widening moves the cursor away from the iframe, so it works. (Browser uses an <img> screencast and Editor is DOM, so only the iframe-based Desktop surface is affected.)

Fix: one CSS rule in plugins/_desktop/webui/desktop-panel.html that disables hit-testing on the frame only while a resize is in progress — right-canvas-store.js already sets right-canvas-resizing on <body> for the duration of the drag:

body.right-canvas-resizing .office-desktop-frame { pointer-events: none; }

Verified locally: shrink then works in both directions, no other interaction affected, and it persists across restart.

The live desktop renders in an iframe (.office-desktop-frame). Canvas resize is
driven by a global pointermove from the left-edge handle; shrinking sweeps the
cursor across the iframe, which captures the event and freezes the drag. Disable
hit-testing on the frame while right-canvas-resizing is set on <body>.
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.

Desktop canvas surface can't be shrunk with the resize handle (iframe captures the drag)

1 participant