Permalink
Browse files

Button: Fixed RTL detection to default to LTR. Fixes #7697 - Buttonse…

…t: Incorrect corners for disconnected elements.

(cherry picked from commit 08450c3)
  • Loading branch information...
scottgonzalez committed Sep 6, 2011
1 parent 5d4d40f commit 000b1736ac9c379fbb4f0f608f407ad25924fcac
Showing with 3 additions and 3 deletions.
  1. +3 −3 ui/jquery.ui.button.js
View
@@ -377,7 +377,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" )
@@ -391,10 +391,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();
},

0 comments on commit 000b173

Please sign in to comment.