Hardware back button and Action Sheet

I got this strange behaviour with Action Sheet called by the hardware back button on Android.

When I call it by any of the UI components everything’s fine, but when I call it by the hardware back button the screen dims but no Action Sheet appears, and if I tap on the screen I see the Action Sheet slide down, so it looks like either there is a problem with z-index or with positioning.

What is the difference between calling it by UI or hardware button? And how can I fix it?