Closed
Bug 908978
Opened 11 years ago
Closed 11 years ago
new Notification API events onclick and onclose aren't being handled
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Firefox OS Graveyard
Gaia::System
Tracking
(blocking-b2g:koi+)
RESOLVED
DUPLICATE
of bug 910915
blocking-b2g | koi+ |
People
(Reporter: caiolima, Unassigned)
References
Details
(Whiteboard: [systemsfe])
Attachments
(1 file, 1 obsolete file)
1.10 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20100101 Firefox/23.0 (Beta/Release)
Build ID: 20130814063812
Steps to reproduce:
Using the UITest case "new Notification()", showing a notification and after clicking on it, neither the onclick and onclose aren't handled.
The same happens if we click the button to close the notification.
Expected results:
These methods should be executed.
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(kyle)
Flags: needinfo?(felash)
Reporter | ||
Comment 1•11 years ago
|
||
Could you confirm this bug please?
Comment 2•11 years ago
|
||
I saw that already too, I said that in bug 901856 comment 1.
Thanks for filing the bug :)
Updated•11 years ago
|
blocking-b2g: --- → koi?
Component: Gaia → Gaia::System
Reporter | ||
Comment 3•11 years ago
|
||
I identified the problem, but I'm a little lost to solve it.
When I use the "nsIAppsService->ShowAppNotification(...)" the observer code is executed normally, but the close operation doesn't work because it's based on "nsIAlertService->ShowAlertNotification"
I guess the correct way to fix it is to make the oberver be called, but I don't have a lot of knowledge how it works.
Could anyone give me a direction?
Reporter | ||
Comment 4•11 years ago
|
||
Attachment #795197 -
Flags: review?(felash)
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(kyle)
Comment 5•11 years ago
|
||
Comment on attachment 795197 [details] [diff] [review]
bug-908978-fix.patch
Review of attachment 795197 [details] [diff] [review]:
-----------------------------------------------------------------
I don't know this code very well.
Gregor, do you feel like you could review this ? Otherwise William Chen or waiting until Vivien is back ?
::: b2g/chrome/content/shell.js
@@ +722,5 @@
> Services.io.newURI(listener.target, null, null),
> Services.io.newURI(listener.manifestURL, null, null)
> );
> }
> + } else if (uid.startsWith("alert") || detail.type.startsWith("desktop-notification")) {
you need to check if detail.type is a String first, this comes from content.
Attachment #795197 -
Flags: review?(felash) → review?(anygregor)
Reporter | ||
Comment 6•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #5)
> you need to check if detail.type is a String first, this comes from content.
Do you think it's really necessary? There is a case where the type is not a string?
Comment 7•11 years ago
|
||
I think this can be null/undefined...
Reporter | ||
Comment 8•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #7)
> I think this can be null/undefined...
I understand, you are right.
Reporter | ||
Comment 9•11 years ago
|
||
Added a verification if type is null
Attachment #795197 -
Attachment is obsolete: true
Attachment #795197 -
Flags: review?(anygregor)
Attachment #796122 -
Flags: review?(anygregor)
Updated•11 years ago
|
Blocks: b2g-notifications
Comment 10•11 years ago
|
||
Note that this may be fixed by the new logic in Bug 910915. Instead of checking detail type, I moved the alert check first, then do a global fall-through otherwise, because as far as I can tell, if it's not an alert, all we care about is either shipping to the message manager or making a system message regardless of detail info.
Comment 11•11 years ago
|
||
Checked on UI test, bug 910915 does fix this. Will wait until reviews are in before taking status actions though.
Comment 12•11 years ago
|
||
Ok, this did end up being a dupe of bug 910915. It'll be fixed when that lands (waiting for tree to unburn).
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Updated•11 years ago
|
No longer blocks: b2g-notifications
Updated•11 years ago
|
blocking-b2g: koi? → koi+
Whiteboard: [systemsfe]
Updated•11 years ago
|
Attachment #796122 -
Flags: review?(anygregor)
You need to log in
before you can comment on or make changes to this bug.
Description
•