I have a web app in which I am using HTML Notifications. It works fine if the user allows it for the first time and start using it, however if user blocks the notification the first time by clicking the block button and later on try to request permission again by some user gesture then the browser doesn't trigger (Allow/Block) popup.
Here is the second time I am triggering the permission.
if(Notification.permission == 'denied' || Notification.permission == 'default'){
Notification.requestPermission(function (permission) {
// If the user accepts, let's create a notification
if (permission === "granted") {
console.log("Regranted");
}
});
}
It works fine for the default
case but not for the denied
case.