From d0b6d276cf008b129edb1a91f64608024c20f584 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Mon, 28 Mar 2011 21:11:17 +0000 Subject: [PATCH] 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 --- modules/jquery.wikiEditor.dialogs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/jquery.wikiEditor.dialogs.js b/modules/jquery.wikiEditor.dialogs.js index f416b4b6..6b3a9cb7 100644 --- a/modules/jquery.wikiEditor.dialogs.js +++ b/modules/jquery.wikiEditor.dialogs.js @@ -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;