Skip to content
Permalink
Browse files

Spinner: Use inline-element for better inline-block support. Removed …

…float:left from input to fix input focussing in IE6.
  • Loading branch information
jzaefferer committed Nov 30, 2010
1 parent 970befc commit 9ef5cd02fa17e81d28e91b8a51f590148aa15949
Showing with 3 additions and 9 deletions.
  1. +2 −2 themes/base/jquery.ui.spinner.css
  2. +1 −7 ui/jquery.ui.spinner.js
@@ -1,12 +1,12 @@
/* Spinner
----------------------------------*/
.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; height: 1.8em; }
.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; float: left; margin-left: .4em; margin-right: 22px; }
.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; z-index: 100; text-align: center; vertical-align: middle; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
.ui-spinner-up { top: 0; }
.ui-spinner-down { bottom: 0; }

/* TR overrides */
div.ui-spinner { background: none; }
span.ui-spinner { background: none; }
@@ -70,12 +70,6 @@ $.widget('ui.spinner', {
self.hovered = false;
});

// TODO: move to theme, ask FG how
// fix inline-block issues for IE. Since IE8 supports inline-block we need to exclude it.
if (!$.support.opacity && uiSpinner.css('display') == 'inline-block' && $.browser.version < 8) {
uiSpinner.css('display', 'inline');
}

this.element
.bind('keydown.spinner', function(event) {
if (self.options.disabled) {
@@ -206,7 +200,7 @@ $.widget('ui.spinner', {
},

_uiSpinnerHtml: function() {
return '<div role="spinbutton" class="ui-spinner ui-state-default ui-widget ui-widget-content ui-corner-all"></div>';
return '<span role="spinbutton" class="ui-spinner ui-state-default ui-widget ui-widget-content ui-corner-all"></span>';
},

_buttonHtml: function() {

0 comments on commit 9ef5cd0

Please sign in to comment.
You can’t perform that action at this time.