When clicking an <a> with a download attribute, Safari asks which app should be used to open the file. However, in an installed PWA the user becomes stranded with no way to go back other than force quitting and relaunching the app.
Steps to reproduce:
1) Visit https://safari-download-bug.surge.sh/ on an iPhone
2) Add the site to your home screen
3) Open it from the home screen
4) Click the link
The app ends up on a file download screen (screenshot: https://will-o.co/WitWcA9Sqj.png) with no other navigation. Even the swipe back gesture doesn't work. There should be a "done" or "back" button somewhere.
Found on an iPhone X running iOS 15.2.1
This is actually tracked here:
Unfortunately, this is an issue outside of the WebKit project and cannot be resolved with a check-in for this project. Therefore this is marked as "RESOLVED | MOVED".