WebKit bug 332895

In an iOS Home Screen web app, opening and closing a link blocks the camera permission prompt until the app is swiped closed.

Report: bugs.webkit.org/show_bug.cgi?id=332895

This only happens in a Home Screen web app on iPhone or iPad. In Safari, tap Share → Add to Home Screen, then open it from the Home Screen and follow the steps.
Tap Allow on the prompt.
2 · Open a link
It opens as a sheet inside the app. Tap Done.
Expected: a permission prompt. With the bug: refused at once, no prompt.

While it is locked, confirm() still shows and step 1 is still granted.

Reset: swipe the app closed in the app switcher, then open it again. Control: after a reset, do steps 1 and 3 without step 2, and the camera prompt shows.