Skip to content

fix: hide image resize handles in view mode#2576

Open
VladaHarbour wants to merge 5 commits intomainfrom
sd-2323_hide-image-resize-view-mode
Open

fix: hide image resize handles in view mode#2576
VladaHarbour wants to merge 5 commits intomainfrom
sd-2323_hide-image-resize-view-mode

Conversation

@VladaHarbour
Copy link
Copy Markdown
Contributor

No description provided.

@VladaHarbour VladaHarbour self-assigned this Mar 26, 2026
@linear
Copy link
Copy Markdown

linear bot commented Mar 26, 2026

@VladaHarbour VladaHarbour force-pushed the sd-2323_hide-image-resize-view-mode branch from d8efe78 to 409269e Compare March 26, 2026 15:32
caio-pizzol and others added 2 commits March 26, 2026 15:55
Word-native test document with embedded image and three Playwright
behavior tests: overlay hidden on hover in viewing mode, selection
outline blocked on click in viewing mode, and overlay still works
in editing mode (sanity check).
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

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

@VladaHarbour looks good! tested in the dev app and the fix works — no resize handles or selection in viewing mode.

one small thing: the click handler hides the table overlay but forgets the image overlay, so stale handles can linger after a mode switch. left an inline comment.

pushed a commit with behavior tests (Word-native fixture + 3 Playwright tests).

// Update table resize overlay on click
if (isViewingMode()) {
hideTableResizeOverlay();
clearSelectedImage();
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.

we tested this — if resize handles are showing when you switch to viewing mode, they stick around until the mouse moves. clicking doesn’t clear them because hideImageResizeOverlay() is missing here. one-line fix:

Suggested change
clearSelectedImage();
hideTableResizeOverlay();
hideImageResizeOverlay();
clearSelectedImage();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pushed some updates to clear selection on mode change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants