Because this element has margins, the scrollWidth will be larger by definition, causing the box to continiously grow in size when opening it multiple times.

Fixes bug 27566
This commit is contained in:
Derk-Jan Hartman 2011-03-28 21:11:17 +00:00
parent 52a6434644
commit d0b6d276cf

View file

@ -172,7 +172,7 @@ fn: {
$(this).css( 'white-space', 'nowrap' );
if ( wrapper.width() <= $(this).get(0).scrollWidth ) {
var thisWidth = $(this).data( 'thisWidth' ) ? $(this).data( 'thisWidth' ) : 0;
thisWidth = Math.max( $(this).get(0).scrollWidth, thisWidth );
thisWidth = Math.max( $(this).get(0).width, thisWidth );
$(this).width( thisWidth );
$(this).data( 'thisWidth', thisWidth );
var wrapperWidth = $(this).data( 'wrapperWidth' ) ? $(this).data( 'wrapperWidth' ) : 0;