Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(buttons): respect disabled attribute #4026

Closed

Conversation

wesleycho
Copy link
Contributor

  • Ensure disabled attribute is respected due to a change in Bootstrap 3.3.5 CSS

Plunker in action here.

This fixes #4013

@wesleycho wesleycho added this to the 0.13.2 (Performance) milestone Jul 28, 2015
- Ensure disabled attribute is respected due to a change in Bootstrap 3.3.5 CSS
@wesleycho wesleycho force-pushed the fix/bootstrap-3.3.5-button branch from 32c347a to 7a1bc7a Compare July 28, 2015 04:15
@@ -24,6 +24,10 @@ angular.module('ui.bootstrap.buttons', [])

//ui->model
element.bind(buttonsCtrl.toggleEvent, function () {
if ('disabled' in attrs) {
return;
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs look fine too.

@Foxandxss
Copy link
Contributor

LGTM

@wesleycho wesleycho closed this in 42e1af5 Jul 30, 2015
@wesleycho wesleycho deleted the fix/bootstrap-3.3.5-button branch August 2, 2015 07:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

disabled and ng-disabled ineffective on radio and checkbox buttons with Bootstrap CSS 3.3.5
3 participants