You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Fixes: #2277.
This end up being a bug on "resizable", and as I have shown on the issue it's quite a weird behavior and it's not consistent across browsers.
The same bug applies to the resizable element and "alsoResize" elements, so I fixed it on both places.
Dialog widget uses "alsoResize" property to update dialog contents size (as seen on the initial issue). This PR fixes that as well.
I have added some tests for both "box-sizing: content-box" and "box-sizing: border-box".
@Daniel-Garmig do you know a way I can "MonkeyPatch" your fix on top of existing jQuery UI? We do stuff like this in our app to patch other jquery UI functions but the magic is never quite the same for all patches.
@mgol I have changed the method to avoid using getBoundingClientRect().
Instead I get the value using parseFloat( element.css( "width" ) );, but without the scrollbars. So I disable scrollbars, get the correct computed size and set scrollbars back. (This seems kind of expensive and slow to me, but idk).
I tried to optimize it, so this calculation is only done when necessary. After a resize, width and height properties will be added as inline css to the element, so I will use those when available to avoid the expensive calculation.
I added some test for resizable elements with transform properties set. It doesn't matter after this changes but why not.
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: #2277.
This end up being a bug on "resizable", and as I have shown on the issue it's quite a weird behavior and it's not consistent across browsers.
The same bug applies to the resizable element and "alsoResize" elements, so I fixed it on both places.
Dialog widget uses "alsoResize" property to update dialog contents size (as seen on the initial issue). This PR fixes that as well.
I have added some tests for both "box-sizing: content-box" and "box-sizing: border-box".