Ionic version:
[x] 5.x
Current behavior:
When you set the attribute [disable] of a ion-fab-button to false instantly after clicking on one of its children in its ion-fab-list then the ion-fab will not close on its own.
Expected behavior:
It should close.
Steps to reproduce:
https://stackblitz.com/edit/ionic-v5-disabled-fab?file=src/app/app.component.html
doStuffAndDisable() => the fab is disabled but not closeddoStuffAndDelayedDisable() => the fab is closed and disabledOther information:
I have looked in different ways of doing this, one was calling manually await this.fab.close() THEN disable the button but it didn't work in a case where I had an async call to a WS made after, I don't know why ...
Maybe this is related to another issue I have with the ion-fab that is the ability of fully controlling its state without a "blackbox" effect https://github.com/ionic-team/ionic-framework/issues/21678
Thanks, I agree this is a bug. As a temporary workaround, you can do:
requestAnimationFrame(() => this.disabled = true);
Most helpful comment
Thanks, I agree this is a bug. As a temporary workaround, you can do: