1
0
mirror of synced 2024-11-22 21:16:10 +03:00

Merge pull request #1351 from alexhaas/patch-1

Fixing inline width declaration when this.opts.width is set to "copy"
This commit is contained in:
Igor Vaynberg 2013-05-28 13:15:54 -07:00
commit ae2f61ef12

View File

@ -1663,12 +1663,12 @@ the specific language governing permissions and limitations under the Apache Lic
}
}
if (this.opts.width === "resolve") {
// next check if css('width') can resolve a width that is percent based, this is sometimes possible
// when attached to input type=hidden or elements hidden via css
style = this.opts.element.css('width');
if (style && style.length > 0) return style;
if (style.indexOf("%") > 0) return style;
if (this.opts.width === "resolve") {
// finally, fallback on the calculated width of the element
return (this.opts.element.outerWidth(false) === 0 ? 'auto' : this.opts.element.outerWidth(false) + 'px');
}