File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1663,12 +1663,12 @@ the specific language governing permissions and limitations under the Apache Lic
16631663 }
16641664 }
16651665
1666- // next check if css('width') can resolve a width that is percent based, this is sometimes possible
1667- // when attached to input type=hidden or elements hidden via css
1668- style = this . opts . element . css ( 'width' ) ;
1669- if ( style && style . length > 0 ) return style ;
1670-
16711666 if ( this . opts . width === "resolve" ) {
1667+ // next check if css('width') can resolve a width that is percent based, this is sometimes possible
1668+ // when attached to input type=hidden or elements hidden via css
1669+ style = this . opts . element . css ( 'width' ) ;
1670+ if ( style . indexOf ( "%" ) > 0 ) return style ;
1671+
16721672 // finally, fallback on the calculated width of the element
16731673 return ( this . opts . element . outerWidth ( false ) === 0 ? 'auto' : this . opts . element . outerWidth ( false ) + 'px' ) ;
16741674 }
You can’t perform that action at this time.
0 commit comments