Closed alfeltrin closed 5 years ago
You can use requireInteraction
option.
https://developer.mozilla.org/en-US/docs/Web/API/Notification/Notification
And we need skip to call setTimeout
when props.timeout <= 0
https://github.com/mobilusoss/react-web-notification/blob/master/src/components/Notification.js#L113
v0.7.0 is available now. https://github.com/mobilusoss/react-web-notification/releases/tag/v0.7.0
The requireInteraction isn't working properly on firefox in linux. It's getting closed automatically after a few seconds even if the timeout is set to 0. It's working properly on chrome.
It seems to be not a matter of this library, but for Firefox. https://bugzilla.mozilla.org/show_bug.cgi?id=862395
The 'timeout' parameter should have a value (for ex. 0) to keep the notification open till the user don't interact