Skip to content

Commit

Permalink
fix(fab-button): sets pointer-events none when disabled
Browse files Browse the repository at this point in the history
relates to #15129
fixes #15120
  • Loading branch information
manucorporat committed Aug 10, 2018
1 parent b70bb70 commit 04d33e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core/src/components/fab-button/fab-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
--padding-top: calc((#{$fab-size} - var(--size)) / 2);
--padding-bottom: calc((#{$fab-size} - var(--size)) / 2);

display: block;

color: #{current-color(contrast)};

font-size: 14px;
Expand All @@ -27,6 +29,9 @@
font-kerning: none;
}

:host(.fab-button-disabled) {
pointer-events: none;
}

:host(.activated) {
--background: #{current-color(tint)};
Expand Down
1 change: 1 addition & 0 deletions core/src/components/fab-button/fab-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class FabButton {
class: {
...createColorClasses(this.color),
...this.getFabClassMap(),
'fab-button-disabled': this.disabled,
'fab-button-translucent': this.translucent
}
};
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/fab/test/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<pre id="log" style="right:10px; bottom:50px; text-shadow: 0 0 2px rgba(0, 0, 0, 0.24);" slot="fixed">log</pre>
<ion-button>Test</ion-button>
<ion-fab-button disabled>FAB</ion-fab-button>
<ion-fab-button disabled onclick="throw 'no clickable'">FAB</ion-fab-button>

<ion-fab vertical="top" horizontal="end" edge id="fab1" slot="fixed">
<ion-fab-button onclick="clickMainFAB('fab1')" mini class="e2eFabTopRight">
Expand Down

0 comments on commit 04d33e5

Please sign in to comment.