#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:2 Changed 13 years ago by
Milestone: | TBD → 1.9 |
---|---|
Priority: | minor → major |
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 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
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 12 years ago by
Milestone: | 1.9 → 1.8.7 |
---|
the bug is ported to 1.8.6. same issue.
i just saw a closed bug http://bugs.jqueryui.com/ticket/5946 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 ex.
like disable
and for buttonset we should have a possibility to add as parameter an array with buttons to show or to hide