]> source.dussan.org Git - jquery-ui.git/commitdiff
Spinner: Work around a bug in IE 6 with the height of the buttons.
authorScott González <scott.gonzalez@gmail.com>
Wed, 14 Sep 2011 13:41:57 +0000 (09:41 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 14 Sep 2011 13:41:57 +0000 (09:41 -0400)
ui/jquery.ui.spinner.js

index e795b880f2197c54f760af6e55e01a15365cb32a..4b7239850da7a7cac4975dbd85acce41ef4ecdd5 100644 (file)
@@ -148,6 +148,12 @@ $.widget( "ui.spinner", {
                        .button()
                        .removeClass( "ui-corner-all" );
 
+               // IE 6 doesn't understand height: 50% for the buttons
+               // unless the wrapper has an explicit height
+               if ( this.buttons.height() === uiSpinner.height() ) {
+                       uiSpinner.height( uiSpinner.height() );
+               }
+
                // disable spinner if element was already disabled
                if ( this.options.disabled ) {
                        this.disable();
@@ -240,7 +246,7 @@ $.widget( "ui.spinner", {
                return 1;
        },
 
-       _precision: function( num ) {
+       _precision: function() {
                var precision = this._precisionOf( this.options.step );
                if ( this.options.min !== null ) {
                        precision = Math.max( precision, this._precisionOf( this.options.min ) );