Open lmeurs opened 11 months ago
@lmeurs Thanks for reporting!
I get your use-case here, those states should definitely match up! We will look into addressing this bug.
Hi @jkasten2, thank you for your comment! Do you have an update for us? Can you give an estimate when this will be picked up / fixed?
What happened?
OneSignal.Notifications.permission
andOneSignal.Notifications.permissionNative
are only updated after eventpermissionChange
is fired, so the following example outputs two different permissions:I can imagine this is intended behaviour, but then a custom event handler cannot update the DOM relying on
OneSignal.Notifications.permission
andOneSignal.Notifications.permissionNative
. A workaround is adding a minor timeout (ugh!) inside the event handler.What browsers are you seeing the problem on?
Chrome (Chromium)
What operating system are you running?
W11
Steps to reproduce?
What did you expect to happen?
See issue description
Relevant log output
No response