You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 29, 2019. It is now read-only.
The right button in the right group is never rendered uncheckable.
Examining/tracing through the code, I think I can explain why it is not working and suggest a solution.
Lines 45-49 of buttons.js are intended to remove the uncheckable attribute from the element if uib-uncheckable evaluates to false. However, removing an attribute using attrs.$set(uncheckable, null) does not seem to work. It looks like the angular function$set()leaves the attribute key/value ofuncheckable="uncheckable"on theattrsobject. In line 37, a check is made to see ifuncheckableis present usingangular.isDefined(attrs.uncheckable). This seems to always returns true becauseuncheckable="uncheckable"evaluates touncheckable=null`.
You might need to remove the attribute from the element directly using removeAttribute() instead of using the angular function $set().
Let me know how I can help.
The text was updated successfully, but these errors were encountered:
JAnderson1122
changed the title
uib-uncheckable not working on radio button directive
Bug: uib-uncheckable not working on radio button directive
Feb 4, 2016
This does look like a bug - if you want to file a PR fixing this, it'd be welcome. Just let me know if you want to work on a fix - if not, I can take a deeper dive into it.
This does look like a bug - if you want to file a PR fixing this, it'd be welcome. Just let me know if you want to work on a fix - if not, I can take a deeper dive into it.
—
Reply to this email directly or view it on GitHub.
c-vetter
added a commit
to c-vetter/angular-ui-bootstrap
that referenced
this issue
Feb 9, 2016
I found this using your demo page: https://angular-ui.github.io/bootstrap/#/buttons
The right button in the right group is never rendered uncheckable.
Examining/tracing through the code, I think I can explain why it is not working and suggest a solution.
Lines 45-49 of buttons.js are intended to remove the
uncheckable
attribute from the element ifuib-uncheckable
evaluates to false. However, removing an attribute usingattrs.$set(uncheckable, null) does not seem to work. It looks like the angular function
$set()leaves the attribute key/value of
uncheckable="uncheckable"on the
attrsobject. In line 37, a check is made to see if
uncheckableis present using
angular.isDefined(attrs.uncheckable). This seems to always returns true because
uncheckable="uncheckable"evaluates to
uncheckable=null`.You might need to remove the attribute from the element directly using
removeAttribute()
instead of using the angular function$set()
.Let me know how I can help.
The text was updated successfully, but these errors were encountered: