In Firefox, notifications are hardcoded to close after 20 seconds. To allow notifications to stay open indefinitely until the user closes them, toggle the
dom.webnotifications.requireinteraction.enabled flag. Navigate to
about:config in the address bar to do this.
The default value for
dom.webnotifications.requireinteraction.enabled is false so it does not require user interaction to dismiss notifications. Set this to true.
Now the caveat is, the service sending the notification also has to use the
requireInteraction property for this setting to have any effect.
You can test it here: https://googlechrome.github.io/samples/notifications/requireInteraction.html. One of the notifications disappears after 20 seconds and the other stays open. If the
dom.webnotifications.requireinteraction.enabled flag is set to false, both will close after 20 seconds.