Alert notification not closing

Discussion of bugs in Seamonkey
Post Reply
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Alert notification not closing

Post by Frank Lion »

This, in alert-common.css doesn't do much -

Code: Select all

/* This is used if the close button is clicked
   before the animation has finished. */
#alertBox[animate][closing] {
  animation-duration: .6s ;
  animation-name: alert-closing-animation ;
}
This does -

Code: Select all

/* This is used if the close button is clicked
   before the animation has finished. */
#alertBox[animate][closing] {
  animation-duration: .6s !important;
  animation-name: alert-closing-animation !important;
}

dom.webnotifications.requireinteraction.enabled to true will only work if the 'sender' has some attribute set at their end, it seems.

The animation default duration, 20 seconds, is also far too short for webmail 'desktop' notifications.
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
frg
Posts: 1361
Joined: December 15th, 2015, 1:20 pm

Re: Alert notification not closing

Post by frg »

Seems to come from Gecko. Own Theme, Modern or classic.
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: Alert notification not closing

Post by Frank Lion »

frg wrote:Seems to come from Gecko. Own Theme, Modern or classic.
I see the non-working close button on own theme and classic.

This is an easy fix that will turn a useless Firefox 'feature' into something that is actually useful, i.e. a proper webmail notifier. Just increase the animation duration to 15 minutes or so and !important the alert close button and the job is done.

The only other notification most people will ever see is the optional alert for downloads and although 20s is better there, it's not the end of the world to close it manually.
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
frg
Posts: 1361
Joined: December 15th, 2015, 1:20 pm

Re: Alert notification not closing

Post by frg »

Hmm Classic under Windows seems to be fine here. Shows the notification (time can be configured in preferences but in seconds). x closes it. If I don't click fades to a notification in the task bar. This goes away when there are no more unread messages. Need to check modern
frg
Posts: 1361
Joined: December 15th, 2015, 1:20 pm

Re: Alert notification not closing

Post by frg »

Same in Modern. All with 2.53.

https://imgur.com/a/fzMaGqV
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: Alert notification not closing

Post by Frank Lion »

frg wrote:Same in Modern. All with 2.53.

https://imgur.com/a/fzMaGqV
I was writing about Web Notifications, not email alerts. This stuff - https://www.bennish.net/web-notifications.html

However, by default it's OK on my stuff and default theme, i.e. it runs for 20 seconds unless you click the close button, which works.

The problem seems to be if you, as I have, increase the animation duration. It increases OK, but the close button closing packs up ...unless you then !important that code.

As it is, 20 seconds is pretty useless for a webmail notification. Do you know a better way of increasing its duration, other than something like -

Code: Select all

#alertBox[animate] {
  animation-duration: 1000s !important;
}
?
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
frg
Posts: 1361
Joined: December 15th, 2015, 1:20 pm

Re: Alert notification not closing

Post by frg »

Sorry misunderstood. Just checked where the alarm box is used. I hacked the notifications together with parts of Fx because they were broken in 2.53 and also had problems in 2.49. Need to retest this.
frg
Posts: 1361
Joined: December 15th, 2015, 1:20 pm

Re: Alert notification not closing

Post by frg »

The 20s seems to be hardcoded:
https://dxr.mozilla.org/mozilla-esr60/s ... ert.js#150

There is a toolkit.cosmeticAnimations.enabled which seems to bypass it when set to false but this will probably just close the window immediately without fading. Converting ALERT_DURATION_IMMEDIATE into a pref might bring some results but because this is global might cause problems for other notifications.
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: Alert notification not closing

Post by Frank Lion »

frg wrote:The 20s seems to be hardcoded:
Hmm, the controversial view would be to scrub that useless animation completely and point Web Notifications stuff towards #newMailAlertNotification

Then again, I have to admit that this 'fix' of mine is actually working very well for me (as I was writing this a new web notification came in!) -

Code: Select all

#alertBox[animate] {
  animation-duration: 1000s !important;
}
#alertBox[animate][closing] {
  animation-duration: .6s !important;
  animation-name: alert-closing-animation !important;
}
Then again....having an animation running for 15 minutes and having to patch up its adverse ripple effect, the close button...is hardly ideal. OK for a user, but can not be default.

Edit - another new web mail notification has come in - amusingly they stack above the previous one. Look quite good. Still don't like any animations though.
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
frg
Posts: 1361
Joined: December 15th, 2015, 1:20 pm

Re: Alert notification not closing

Post by frg »

There is Bug 1205491 still open. This looks like it would make everything configurable. 4 year old so also looks like it will rot forever :(

https://bugzilla.mozilla.org/show_bug.cgi?id=1205491
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: Alert notification not closing

Post by Frank Lion »

In fairness to Firefox, they did implement the dom.webnotifications.requireinteraction.enabled pref which, if websites coded these notifications right, would actually be enough to sort this, i.e. the notification would not vanish after 20 seconds.

Trouble is, many webmail sites don't, hence my 'fix' (workaround).


Image

https://bugzilla.mozilla.org/show_bug.cgi?id=862395
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
Post Reply