Skip to main content

Search and Top Navigation

#6262 closed bug (fixed)

Opened November 04, 2010 02:37PM UTC

Closed November 12, 2010 03:30PM UTC

Last modified December 08, 2010 06:33PM UTC

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:

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()},

Attachments (0)
Change History (4)

Changed November 09, 2010 05:31PM UTC by goldy comment:1

_comment0: the bug is ported to 1.8.6. same issue.1289388374338383

the bug is ported to 1.8.6. same issue.

i just saw a closed bug

which is strange for me, because the case is kinda very private. He want to hide certain buttons from a button set.

for me the solution should not be so general for all buttonsets and buttons. If he wants to hide specific button he should add a class ui-helper-hidden or better to implement some kind of functionality in ui.button and ui.buttonset to hide button



like disable


and for buttonset we should have a possibility to add as parameter an array with buttons to show or to hide


Changed November 12, 2010 02:54PM UTC by scottgonzalez comment:2

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.

Changed November 12, 2010 03:30PM UTC by Scott González comment:3

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

Changed December 08, 2010 06:33PM UTC by scottgonzalez comment:4