Skip to content

Resizeable: avoid braking the size of an image#2379

Open
aleen42 wants to merge 1 commit into
jquery:mainfrom
aleen42:main
Open

Resizeable: avoid braking the size of an image#2379
aleen42 wants to merge 1 commit into
jquery:mainfrom
aleen42:main

Conversation

@aleen42

@aleen42 aleen42 commented Jan 15, 2026

Copy link
Copy Markdown

When an image has both margin and padding, there are two problems:

  1. margin has set to the wrapper, but the image's one is not clear when initialising
  2. While destroying the resizable widget, the image has resized while setting the width with outerWidth or the height with outerHeight.

@mgol

mgol commented Jan 26, 2026

Copy link
Copy Markdown
Member

Thanks for the report. Does the issue you describe exist when jQuery UI 1.12.1 is used or only with jQuery UI 1.13.0 or newer?

@mgol

mgol commented Jan 26, 2026

Copy link
Copy Markdown
Member

Also, please provide a runnable test case on a platform like JS Bin.

@mgol

mgol commented Jan 26, 2026

Copy link
Copy Markdown
Member

I also didn't notice it was a PR. Changes like that also need tests ensuring the issue is really fixed.

@mgol mgol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Requires tests. Ideally, please also prepare a test case on JS Bin or similar.

@aleen42

aleen42 commented Jan 29, 2026

Copy link
Copy Markdown
Author

Thanks for reviewing, I will make it later.

@aleen42

aleen42 commented Feb 19, 2026

Copy link
Copy Markdown
Author

@mgol As you can see in the https://jsbin.com/muxihix example, the image has the wrong position after being initialised inside a resizer wrapper.

Here is another correct example after fixing: https://jsbin.com/rinazoq

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

Development

Successfully merging this pull request may close these issues.

2 participants