Spinner: Fix the IE6-height-fix to not break the spinner when initialized while not visible

This commit is contained in:
Jörn Zaefferer 2011-09-24 14:36:39 +02:00
parent 34a0479d1c
commit bf51b0e71c

View File

@ -150,7 +150,7 @@ $.widget( "ui.spinner", {
// IE 6 doesn't understand height: 50% for the buttons
// unless the wrapper has an explicit height
if ( this.buttons.height() === uiSpinner.height() ) {
if ( this.buttons.height() === uiSpinner.height() && uiSpinner.height() > 0 ) {
uiSpinner.height( uiSpinner.height() );
}