New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 335918 link

Starred by 14 users

Issue metadata

Status: Fixed
Owner: ----
Closed: May 2018
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Sign in to add a comment

Calling chrome.notifications.clear when a notification is clicked in the notifications center does not clear the notification immediately

Reported by, Jan 18 2014

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.29 Safari/537.36

Steps to reproduce the problem:
1. Load the attached extension. It will display a notification.
2. Wait for the notification to disappear from the screen (so the notification bell goes white)
3. Open the notifications center and click on the notification.
4. Close the notification center and open it again.

What is the expected behavior?
The notification should disappear when clicked, as the method chrome.notifications.clear is called in the onClicked callback function.

What went wrong?
The notification does not disappear immediately, but remains until the notification center is closed. When the notification center is reopened, the notification has disappeared.

WebStore page: 

Did this work before? Yes It definitely worked on Chrome 31, but not on the latest stable version

Chrome version: 33.0.1750.29  Channel: beta
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 12.0 r0
1.6 KB View Download
226 bytes Download
3.2 KB View Download
Labels: -Cr-Platform-Extensions -OS-Windows OS-All Cr-UI-Notifications
Status: Assigned
This is intended but probably not the best behavior; we didn't want things to change out from under the user while they are looking at the notification center.  We will likely move back to the older behavior eventually.
 Issue 336092  has been merged into this issue.
I have to say that my users are being confused now because they are clicking the buttons on the notification and instead of it disappearing to confirm their action, it does nothing.

Note: The actions behind the button are being executed but when the notification does not disappear it creates confusion since the buttons do clear the notification when initially shown.

ps. I have found an ugly but necessary workaround whereby in the button code I call the .clear (which does nothing) but then I open an empty window ( and immediately close that window. This removes the focus from the notification and therefore causes it to finally disappear.
Is there any progress on this issue?

I have a use case for this. My extension is a notifier for a certain inbox, and the notification can either be closed (leaving the messages unread) or closed with a button "Dismiss as read" (which marks messages as read).

If the button is clicked while the notification is still shown, it will work as intended, performing the action and clearing. If it is clicked "late", from the notifications center, the behavior is different and confusing.
I just wanted to leave my mark on this. My lengthy explanation of what I thought was something I was doing wrong until directed to this page.

I have come to the horrible conclusion of stripping the popup completely clean of all content, and THEN try calling the clear command. EG, calling notification.update(id, {message: "", type: "basic", title: "", contextMessage: "", buttons: []}, clearNotification); 

This would not stop users retriggering notification.onClicked but will stop notification.onButtonClicked since there are no more buttons left to click.

So even though the popup doesn't vanish like I would hope, atleast it is now bare and reduces the confusion. Now it just looks like a horrible UI bug caused by chromium rather than a extension notification bug.

Labels: -Pri-2 Pri-1 Hotlist-Notifications
 Issue 349260  has been merged into this issue.
 Issue 335807  has been merged into this issue.
Status: Started
This is related to #435502.
The problem does not only occur when a notification is closed, but also when it's updated. No change is visible until the notification area is reopened.
 Issue 435502  has been merged into this issue.
Labels: Hotlist-Recharge
This issue likely requires triage.  The current issue owner maybe inactive (i.e. hasn't fixed an issue in the last 30 days).  Thanks for helping out!

Labels: -Hotlist-Recharge hotlist-recharge
Status: WontFix (was: Started)
The notification center was removed in M47 so closing this.

Comment 14 by, Mar 24 2016

Labels: -Pri-1 -hotlist-recharge -Hotlist-Notifications -OS-All OS-Chrome Pri-3
Status: Available (was: WontFix)
Not for Chrome OS. I am decreasing priority since we aren't actively working on this.
Project Member

Comment 15 by, Mar 27 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit - Your friendly Sheriffbot

Comment 16 by, Mar 28 2017

Owner: ----
Status: Available (was: Untriaged)
Project Member

Comment 17 by, May 7 2018

Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit - Your friendly Sheriffbot

Comment 18 by, May 10 2018

Status: Fixed (was: Untriaged)
Just tried the steps in the description on Chrome OS v65 and it did not reproduce (the notification disappeared immediately in step 3, leaving an empty space in the notification center). 

Hence closing as Fixed, if anyone is still experiencing the issue, please file a new bug referencing this one.

Sign in to add a comment