You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice after use event.preventDefault() inside foregroundWillDisplay listener, when I close and restart the app, the notification will display again
Steps to reproduce?
1. use preventDefault inside foregroundWillDisplay listener
2. close the app and reopen
3. wait few second, the notification will appear again
What did you expect to happen?
on step 3 I don't expect notification because I used preventDefault inside foregroundWillDisplay listener
OneSignal Cordova SDK version
5.2.9
Which platform(s) are affected?
iOS
Android
Relevant log output
I found how to fix it, inside src/android/com/onesignal/cordova/OneSignalPush.java
in the functionpreventDefault
replace 'event.preventDefault();' with 'event.preventDefault(true);'
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
spiderciccio
changed the title
[Bug]: notification displayed on app restarted
[Bug]: preventDefault notification displayed on app restarted
Jan 26, 2025
What happened?
I notice after use event.preventDefault() inside foregroundWillDisplay listener, when I close and restart the app, the notification will display again
Steps to reproduce?
What did you expect to happen?
on step 3 I don't expect notification because I used preventDefault inside foregroundWillDisplay listener
OneSignal Cordova SDK version
5.2.9
Which platform(s) are affected?
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: