Button: Fixed RTL detection to default to LTR. Fixes #7697 - Buttonset: Incorrect corners for disconnected elements.

This commit is contained in:
Scott González 2011-09-06 11:00:42 -04:00
parent 02c821da6e
commit 08450c3b2d

View File

@ -379,7 +379,7 @@ $.widget( "ui.buttonset", {
},
refresh: function() {
var ltr = this.element.css( "direction" ) === "ltr";
var rtl = this.element.css( "direction" ) === "rtl";
this.buttons = this.element.find( this.options.items )
.filter( ":ui-button" )
@ -393,10 +393,10 @@ $.widget( "ui.buttonset", {
})
.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
.filter( ":first" )
.addClass( ltr ? "ui-corner-left" : "ui-corner-right" )
.addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
.end()
.filter( ":last" )
.addClass( ltr ? "ui-corner-right" : "ui-corner-left" )
.addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
.end()
.end();
},