fix(_desktop): allow shrinking the Desktop canvas surface#1694
Open
King0James0 wants to merge 1 commit into
Open
fix(_desktop): allow shrinking the Desktop canvas surface#1694King0James0 wants to merge 1 commit into
King0James0 wants to merge 1 commit into
Conversation
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>.
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 #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 globalpointermovefrom 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.htmlthat disables hit-testing on the frame only while a resize is in progress —right-canvas-store.jsalready setsright-canvas-resizingon<body>for the duration of the drag:Verified locally: shrink then works in both directions, no other interaction affected, and it persists across restart.