Skip to content

fix: allow resizing images wrapped in inline links#53

Merged
iamsivin merged 2 commits into
mainfrom
fix/image-resize
Jun 11, 2026
Merged

fix: allow resizing images wrapped in inline links#53
iamsivin merged 2 commits into
mainfrom
fix/image-resize

Conversation

@iamsivin

Copy link
Copy Markdown
Member

Description

This PR fixes an issue where pasted images could not be resized immediately after being added to the editor. In some cases, pasted images are wrapped inside an inline <a> element whose clientWidth is 0. Since the resize logic relies on this value, it would exit early and prevent the resize handles from functioning until the editor was reloaded.

The fix introduces a fallback to the editor width (view.dom.clientWidth) whenever the parent element does not provide a valid width, ensuring that image resizing works correctly without requiring a page refresh.

@sony-mathew sony-mathew 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.

LGTM

@iamsivin iamsivin merged commit 6dc4a0a into main Jun 11, 2026
4 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.

2 participants