Skip to content

Commit 08450c3

Browse files
committed
Button: Fixed RTL detection to default to LTR. Fixes #7697 - Buttonset: Incorrect corners for disconnected elements.
1 parent 02c821d commit 08450c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/jquery.ui.button.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ $.widget( "ui.buttonset", {
379379
},
380380

381381
refresh: function() {
382-
var ltr = this.element.css( "direction" ) === "ltr";
382+
var rtl = this.element.css( "direction" ) === "rtl";
383383

384384
this.buttons = this.element.find( this.options.items )
385385
.filter( ":ui-button" )
@@ -393,10 +393,10 @@ $.widget( "ui.buttonset", {
393393
})
394394
.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
395395
.filter( ":first" )
396-
.addClass( ltr ? "ui-corner-left" : "ui-corner-right" )
396+
.addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
397397
.end()
398398
.filter( ":last" )
399-
.addClass( ltr ? "ui-corner-right" : "ui-corner-left" )
399+
.addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
400400
.end()
401401
.end();
402402
},

0 commit comments

Comments
 (0)