One Line Summary
Notification.permission
is incorrectly reported as "default"
on iOS App Webs, this happens when tapping on a notification that results in a new "window" being opened via clients.openWindow
.
Why this is is important to fix
This is confusing to the end-user as sites will check Notification.permission
and see it is "default"
and then attempt to show the end-user a soft notification permission prompt again.
Steps to reproduce the issue
- On a iOS 16.4 or newer device open https://ios-webapp-notification-new-window-permission-bug.glitch.me in Safari
- Tap share button
- Tap "Add to Home Screen"
- Open the iOS Web App you just added
- Tap "Prompt Notification permission"
- On the iOS native notification permission prompt press "Allow"
- Tap "Display notification"
- Tap on the notification
- [Safari/iOS Bug] Observe Notification.permission reports as "default" when it should be "granted"
What devices are affected
I have reproduce this issue on an iPhone 14 Pro on both iOS 16.7.2 & 17.1.2. However I would expect all iOS 16.4+ devices to be effected.