Skip to content

Commit 000b173

Browse files
committed
Button: Fixed RTL detection to default to LTR. Fixes #7697 - Buttonset: Incorrect corners for disconnected elements.
(cherry picked from commit 08450c3)
1 parent 5d4d40f commit 000b173

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
@@ -377,7 +377,7 @@ $.widget( "ui.buttonset", {
377377
},
378378

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

382382
this.buttons = this.element.find( this.options.items )
383383
.filter( ":ui-button" )
@@ -391,10 +391,10 @@ $.widget( "ui.buttonset", {
391391
})
392392
.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
393393
.filter( ":first" )
394-
.addClass( ltr ? "ui-corner-left" : "ui-corner-right" )
394+
.addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
395395
.end()
396396
.filter( ":last" )
397-
.addClass( ltr ? "ui-corner-right" : "ui-corner-left" )
397+
.addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
398398
.end()
399399
.end();
400400
},

0 commit comments

Comments
 (0)