ion toast blocks focus on any input in Ionic 6

Viewed 119

Case: I have a very simple form, and when the user clicks submit while it's invalid, I display a toast with an error message.

problem: this problem only occurred after I had migrated to Ionic 6, while the toast is displayed I cannot focus on any input till the toast disappears.

any solution ?

1 Answers

Apparently the issue occurs because the toast steals focus from the inputs and it has something to do with tapindex set to -1

solution:

   this.toast.removeAttribute("tabindex");
    await this.toast.present();

there is an open issue at their github repo.

Related