-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Dialog: Content shrinks on resizing when box-sizing: content-box #2277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report with a clear test case! Since the issue is already in 1.12, given limited team resources it's not likely to be fixed by the UI team; see the project status at https://blog.jqueryui.com/2021/10/jquery-maintainers-update-and-transition-jquery-ui-as-part-of-overall-modernization-efforts/. PRs are welcome if they're not too complex and contain tests. |
I'm working on a fix for this. I will make a PR soon. Here I give some more details about what I found. I have make the following test case: This is the test case if you want to try by yourself. As you can see in the code, I'm using jQuery ".width()" to get element width on JS. But I believe jQuery is working just fine and it's a browser thing (as can be seen on the images). I'll like to hear some opinions about it! |
Resizable element shrinks on resize when it has scrollbars and "box-sizing: content-box". Fixes: jquerygh-2277
We had this reported at PrimeFaces as well: primefaces/primefaces#11476 |
Dialog content shrinks when dialog have scrollbars and is resized.

This is a similar problem as in #1979 and #2083.
It was marked as solved in jQueryUI 1.13.3 but it still happen on some cases (when
box-sizing: content-box
).I have done the following tests:
Bug only seems to happen on Chromium-based browsers (tested on Chrome 127.0.6533.89 and Edge 127.0.2651.86). It works fine on Firefox (tested on Firefox 128.0.3)
Sample fiddle: https://jsfiddle.net/67j9nm43/1/
Fiddle uses jQueryUI 1.13.3. You may change box-sizing between
border-box
/content-box
to test both cases.I know this is kind of a edge case, as most people today uses
box-sizing: border-box
, but some old projects may still usebox-sizing: content-box
as it is the default option.The text was updated successfully, but these errors were encountered: