Current Behavior
Even if an ondismiss function and dismissible: true are specified, closing alert doesn't trigger that function.
It's a long-existed bug, since flarum-pwa uses this to remember user's preference, not to notify user to enable push notification - the result is the extension always show alerts, even if user has closed alerts before.
Steps to Reproduce
Just paste the code below into the console. After closing the alert, you'll easily find the alert() doesn't run.
app.alerts.show({
dissmissible: true,
ondismiss: ()=>alert('dismissed')
}, 'test');
Expected Behavior
ondismiss function should be called.
Screenshots
No response
Environment
- Flarum version: 1.x & 2.x latest version
- Website URL: N/A
- Webserver: N/A
- Hosting environment: N/A
- PHP version: N/A
- Browser: Seems happens on all browsers
Output of php flarum info
No response
Possible Solution
No response
Additional Context
No response
Current Behavior
Even if an
ondismissfunction anddismissible: trueare specified, closing alert doesn't trigger that function.It's a long-existed bug, since flarum-pwa uses this to remember user's preference, not to notify user to enable push notification - the result is the extension always show alerts, even if user has closed alerts before.
Steps to Reproduce
Just paste the code below into the console. After closing the alert, you'll easily find the
alert()doesn't run.Expected Behavior
ondismissfunction should be called.Screenshots
No response
Environment
Output of
php flarum infoNo response
Possible Solution
No response
Additional Context
No response