Closed
Bug 897874
Opened 11 years ago
Closed 11 years ago
[Notification] horizontally scrollable with many CB messages
Categories
(Firefox OS Graveyard :: Gaia::System, defect, P1)
Tracking
(blocking-b2g:leo+, b2g18 fixed, b2g-v1.1hd fixed)
People
(Reporter: leo.bugzilla.gaia, Assigned: alive)
References
Details
(Whiteboard: [TD-68830] [LeoVB+])
Attachments
(3 files)
When there are many CB messages on notification panel, the notification panel becomes horizontally scrollable. The notification item was swiped away to get deleted, however the notification panel scrolled horizontally. It was reported that this issue is not reproducible with SMS, but is reproducible with CB messages.
Comment 1•11 years ago
|
||
Hi Alive, Would you take a quick look of the video attachment and see if this is a know issue (hopefully with a patch)? Thanks
Flags: needinfo?(alive)
blocking-b2g: --- → leo+
Priority: -- → P1
Target Milestone: --- → 1.1 QE5
Comment 3•11 years ago
|
||
Hi Yuren, Can you see if you can help out here?
Flags: needinfo?(yurenju.mozilla)
Assignee | ||
Comment 4•11 years ago
|
||
Don't transition before handler is set.
Assignee: nobody → alive
Attachment #781573 -
Flags: review?(timdream)
Assignee | ||
Comment 5•11 years ago
|
||
Hmm, I mad the patch yesterday and clicked the submit button but I didn't check the status and was attracted by something else...
Updated•11 years ago
|
Attachment #781573 -
Flags: review?(timdream) → review+
Assignee | ||
Comment 7•11 years ago
|
||
master https://github.com/mozilla-b2g/gaia/commit/a3d7268219f6ff92d296a3305bdfef14209885dc
Comment 8•11 years ago
|
||
(In reply to Alive Kuo [:alive] from comment #7) > master > > https://github.com/mozilla-b2g/gaia/commit/ > a3d7268219f6ff92d296a3305bdfef14209885dc Too bad.. this is still happening with the patch...
Assignee | ||
Comment 9•11 years ago
|
||
What's the action? Do you wait for a while that transition is ended?
Comment 10•11 years ago
|
||
I think I found the reason now. The problem is, in removeNotification function in notifications.js, it should use 'querySelectorAll' instead of 'querySelector' and loop each item. var notificationNodes = this.container.querySelectorAll(notifSelector); for (var i = notificationNodes.length - 1; i >= 0; i--) { console.log('nnnnn removeNotification checkpoint 1'); notificationNodes[i].parentNode.removeChild(notificationNodes[i]); } var lockScreenNotificationNodes = this.lockScreenContainer.querySelectorAll(notifSelector); for (var i = lockScreenNotificationNodes.length - 1; i >= 0; i--) { console.log('nnnnn removeNotification checkpoint 2'); lockScreenNotificationNodes[i].parentNode .removeChild(lockScreenNotificationNodes[i]); } p.s. The notificationID for CB messages that were added by cell_broadcast_system.js is undefined. and there can be multiple of those notifications on notification panel at a time.
Comment 11•11 years ago
|
||
(In reply to hanj.kim25 from comment #10) Hm.. it's supposed to remove only the one that was touched/swiped. Please ignore the 'querySelectorAll' solution above.
Comment 12•11 years ago
|
||
The problem was the notification items that were added by cell_broadcast_system.js have notificationID being undefined. Introducing a new function, removeNotificationByNode, fixes the problem. Let me create a pull request with this. Thanks closeNotification: function ns_closeNotification(notificationNode) { var notificationID = notificationNode.dataset.notificationID; var event = document.createEvent('CustomEvent'); event.initCustomEvent('mozContentEvent', true, true, { type: 'desktop-notification-close', id: notificationID }); window.dispatchEvent(event); if (notificationNode.dataset.notificationID === 'undefined') this.removeNotificationByNode(notificationNode); else this.removeNotification(notificationNode.dataset.notificationID); }, removeNotificationByNode: function ns_removeNotificationByNode(notificationNode) { if (notificationNode) { notificationNode.parentNode.removeChild(notificationNode); } },
Reporter | ||
Comment 13•11 years ago
|
||
Attachment #784159 -
Flags: review?(alive)
Assignee | ||
Comment 14•11 years ago
|
||
Comment on attachment 784159 [details]
Pull request url
Thanks for finding out the root cause.
But I think we couldn't let notificationID to be undefined.
So we shall give an ID in cell broadcast module instead modifying the notification module.
See voicemail for reference.
Attachment #784159 -
Flags: review?(alive) → review-
Comment 15•11 years ago
|
||
Uplifted a3d7268219f6ff92d296a3305bdfef14209885dc to: v1-train: 288276c9762502211ab5432bf8db6dd0cb9faa6c
Assignee | ||
Comment 16•11 years ago
|
||
File a new bug to track #12
Comment 17•11 years ago
|
||
v1.1.0hd: 288276c9762502211ab5432bf8db6dd0cb9faa6c
status-b2g-v1.1hd:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•