Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#6262 closed bug (fixed)

buttonset not applying ui-corner to invisible elements

Reported by: goldy Owned by:
Priority: major Milestone: 1.8.7
Component: ui.button Version: 1.8.5
Keywords: Cc:
Blocked by: Blocking:

Description

I'm using jquery UI tabs , on every tab i have 2 radios in a buttonset. The init of the buttonset is in the document ready function. On the current active tab the buttons are with rounded corners as they should be, but when i change the tab suddenly the buttonset is not with rounded corners, but if I refresh the buttons become rounded. I think the problem appears because probably the widget doesn't add Class .ui-corner to invisible items.

in 1.8.5 full min js on line 354

a.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right")'''.filter(":visible")'''.filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end().end()},

Change History (4)

comment:1 Changed 8 years ago by goldy

the bug is ported to 1.8.6. same issue.

Version 0, edited 8 years ago by goldy (next)

comment:2 Changed 8 years ago by Scott González

Milestone: TBD1.9
Priority: minormajor

We can fix this by adding an items option to define the selector to use for finding buttons and revert back to not filtering down to only visible elements. Then the use case in #5946 can be accomplished by providing a custom selector that limits to visible elements. Having hidden buttonsets initialize properly is probably more important than having individually hidden button elements handled by default.

comment:3 Changed 8 years ago by Scott González

Resolution: fixed
Status: newclosed

Buttonset: Added items option and removed visible filter for adding rounded corners. Fixes #6262 - buttonset not applying ui-corner to invisible elements.

Changeset: 5dad57e3c2001b6c644e3c39798198bc34fa1e5d

comment:4 Changed 7 years ago by Scott González

Milestone: 1.91.8.7
Note: See TracTickets for help on using tickets.