-
Notifications
You must be signed in to change notification settings - Fork 6.7k
fix(buttons): respect disabled attribute #4026
Conversation
- Ensure disabled attribute is respected due to a change in Bootstrap 3.3.5 CSS
32c347a
to
7a1bc7a
Compare
@@ -24,6 +24,10 @@ angular.module('ui.bootstrap.buttons', []) | |||
|
|||
//ui->model | |||
element.bind(buttonsCtrl.toggleEvent, function () { | |||
if ('disabled' in attrs) { | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the preferred syntax over if(attrs.disabled) which dropwdownToggle and tab directives use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is Angular 1.4 - it turns out that attrs.disabled
is undefined
there, but the key is present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Tabs component, this should be fine - the only way there would be a problem is if the disabled
attribute is used instead of disable
, which is deprecated use.
For the dropdown toggle, I opened #4033
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Looks like the dropdown works perfectly fine in 1.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tabs look fine too.
LGTM |
Plunker in action here.
This fixes #4013