Possible bug: Ionic modal trap is still active at onWillDismiss

I noticed today that I cannot focus any element in the callback of the modal.onWillDismiss, but only in the modal.onDidDismiss …
But wouldn’t it make more sense to release the focus trap earlier on to get a smoother experience?

In my case I navigate to a new page in the dismiss handler and on that page is an textarea that should get focussed on (view) init.
As a current solution I had to built a rather complex solution to start navigating in onWillDismiss, but call the focus method manually after I trigger an event on the onDidDismiss

But I’m not exactly sure, what the expected behaviour is, so I wrote here before opening a bug issue.

Hey there! Can you provide a sample project for this? We need something like this to isolate and debug the problem.

Here is a minimal sample: Ionic Modal onWillDismiss focus trap - StackBlitz

Had to use one empty setTimeout to make even the onDidDismiss work, let me know in case you need the actual real example with the NavController included… Though should already be clear from the mocked state.

Update: The ideal solution would be, in my opinion, that I could focus the next element in either of the callbacks, without any timeout necessary …