Prevent click events on disable buttons

For some reasons, despite being disabled, buttons still call the action
defined as `ngClick`. In the case of the burn progress button, this
results in:

```sh
TypeError: Cannot read property 'device' of undefined
```

Fixes: https://github.com/resin-io/etcher/issues/132
This commit is contained in:
Juan Cruz Viotti 2016-01-26 08:40:43 -04:00
parent d5f3b59fb4
commit cc5d6456b8
2 changed files with 3 additions and 1 deletions

View File

@ -5877,7 +5877,8 @@ hero-icon[disabled] hero-caption {
hero-button .btn[disabled] { hero-button .btn[disabled] {
background-color: #313339; background-color: #313339;
color: #787c7f; } color: #787c7f;
pointer-events: none; }
hero-button .btn[disabled]:hover { hero-button .btn[disabled]:hover {
background-color: #36383e; } background-color: #36383e; }

View File

@ -52,6 +52,7 @@ hero-button .btn {
&[disabled] { &[disabled] {
background-color: $btn-disabled; background-color: $btn-disabled;
color: $color-disabled; color: $color-disabled;
pointer-events: none;
&:hover { &:hover {
background-color: lighten($btn-disabled, 2); background-color: lighten($btn-disabled, 2);