Skip to content

Commit

Permalink
Button: Fixed RTL detection to default to LTR. Fixes #7697 - Buttonse…
Browse files Browse the repository at this point in the history
…t: Incorrect corners for disconnected elements.

(cherry picked from commit 08450c3)
  • Loading branch information
scottgonzalez committed Sep 6, 2011
1 parent 5d4d40f commit 000b173
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/jquery.ui.button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand All @@ -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();
},
Expand Down

0 comments on commit 000b173

Please sign in to comment.