Closed
Bug 860951
Opened 11 years ago
Closed 11 years ago
\n in XUL alert text doesn't create a newline
Categories
(Toolkit :: General, defect)
Toolkit
General
Tracking
()
VERIFIED
FIXED
mozilla24
Tracking | Status | |
---|---|---|
firefox21 | --- | unaffected |
firefox22 | + | fixed |
firefox23 | + | verified |
People
(Reporter: reuben, Assigned: reuben)
References
Details
(Keywords: regression)
Attachments
(1 file)
749 bytes,
patch
|
Unfocused
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService).showAlertNotification(null, "Title", "Foo\nBar"); Actual results: Foo Bar Expected results: Foo Bar
Assignee | ||
Updated•11 years ago
|
OS: All → Mac OS X
Comment 1•11 years ago
|
||
Seeing this on Windows 7, too.
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Updated•11 years ago
|
tracking-firefox22:
--- → ?
Updated•11 years ago
|
Assignee: nobody → wchen
status-firefox21:
--- → unaffected
status-firefox22:
--- → affected
status-firefox23:
--- → affected
tracking-firefox23:
--- → +
Comment 2•11 years ago
|
||
The reason this happens is because the XUL alerts use a <xul:label> for the text of the alert and it doesn't support newlines. This isn't a regression, it's been that way in the XUL alerts since hg 1 so I'm not sure this bug should be tracked. If we do want to allow new lines in alerts, then I think this bug would be better assigned to someone with more XUL experience.
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to William Chen [:wchen] from comment #2) > The reason this happens is because the XUL alerts use a <xul:label> for the > text of the alert and it doesn't support newlines. This isn't a regression, > it's been that way in the XUL alerts since hg 1 so I'm not sure this bug > should be tracked. If we do want to allow new lines in alerts, then I think > this bug would be better assigned to someone with more XUL experience. This is a regression in notifications. I can reword the bug title, but the underlying problem is still the same: newlines used to work, and now they don't. Can't we use something else instead of a <xul:label>?
Comment 4•11 years ago
|
||
I think we may just need to set the |whitespace: pre;| CSS style on the label.
Comment 5•11 years ago
|
||
Actually, that should be |white-space: pre-wrap;|
Assignee | ||
Comment 6•11 years ago
|
||
<Unfocused> such a beautiful bromance Why don't you play a part in this heartwarming story?
Attachment #753515 -
Flags: review?(bmcbride)
Updated•11 years ago
|
Attachment #753515 -
Flags: review?(bmcbride) → review+
Assignee | ||
Comment 7•11 years ago
|
||
\o/ https://hg.mozilla.org/integration/mozilla-inbound/rev/0134d330663f
Assignee: wchen → reuben.bmo
Assignee | ||
Comment 8•11 years ago
|
||
Oops, that file uses 2 space indentation. https://hg.mozilla.org/integration/mozilla-inbound/rev/d9cf9e32f267
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0134d330663f https://hg.mozilla.org/mozilla-central/rev/d9cf9e32f267
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Comment 10•11 years ago
|
||
Would you mind requesting uplift to Aurora/Beta to make sure this is resolved in FF23, preventing a regression?
Assignee | ||
Comment 11•11 years ago
|
||
Comment on attachment 753515 [details] [diff] [review] Add white-space: pre-wrap; to alert text [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 782211 User impact if declined: multi-line notifications shown in a single line Testing completed (on m-c, etc.): Landed on m-c a week ago, no problems have surfaced Risk to taking this patch (and alternatives if risky): None String or IDL/UUID changes made by this patch: None
Attachment #753515 -
Flags: approval-mozilla-beta?
Attachment #753515 -
Flags: approval-mozilla-aurora?
Updated•11 years ago
|
Attachment #753515 -
Flags: approval-mozilla-beta?
Attachment #753515 -
Flags: approval-mozilla-beta+
Attachment #753515 -
Flags: approval-mozilla-aurora?
Attachment #753515 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 12•11 years ago
|
||
Thanks! https://hg.mozilla.org/releases/mozilla-aurora/rev/50125a7e87f7 https://hg.mozilla.org/releases/mozilla-beta/rev/ef532a492aa4
Comment 13•11 years ago
|
||
Is there anything QA can do here?
Comment 15•11 years ago
|
||
Can you please give me some examples of notifications with which I could reproduce/verify this bug?
Flags: needinfo?(reuben.bmo)
Assignee | ||
Comment 16•11 years ago
|
||
(In reply to Ioana Budnar, QA [:ioana] from comment #15) > Can you please give me some examples of notifications with which I could > reproduce/verify this bug? Open the browser console (Ctrl/Cmd+Shift+J), paste the text from comment 0 and press enter: Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService).showAlertNotification(null, "Title", "Foo\nBar"); You should see three separate lines of text in the notification: "Title", "Foo" and "Bar".
Flags: needinfo?(reuben.bmo)
Comment 17•11 years ago
|
||
I thought there was some other way. I tried with the Error Console and Web Console and I got "ReferenceError: Cc is not defined". Firefox 23 doesn't have the Browser Console.
Assignee | ||
Comment 18•11 years ago
|
||
You can also flip the "devtools.chrome.enabled" pref to true, and then run that code in Scratchpad, with the Browser environment.
Assignee | ||
Comment 19•11 years ago
|
||
Hm, WebNotifications landed in 22, so alternatively you can also do this in the page console or scratchpad: Notification.requestPermission(); *Allow notifications using the doorhanger popup* new Notification("Title", { body: "Foo\nBar" });
Comment 20•11 years ago
|
||
(In reply to Reuben Morais [:reuben] from comment #19) > Hm, WebNotifications landed in 22, so alternatively you can also do this in > the page console or scratchpad: > > Notification.requestPermission(); > *Allow notifications using the doorhanger popup* > new Notification("Title", { body: "Foo\nBar" }); Thanks for all the help Reuben. I verified this as fixed on Firefox 23 beta 10 (20130729175331), Ubuntu 13.04 32bit and Windows 7 64bit. I tried to verify it on Mac OSX 10.7, but there's no notification shown there for some reason. Is this a known issue, or somehow designed to work differently on Mac?
Assignee | ||
Comment 21•11 years ago
|
||
(In reply to Ioana Budnar, QA [:ioana] from comment #20) > I tried to verify it on Mac OSX 10.7, but there's no notification shown > there for some reason. Is this a known issue, or somehow designed to work > differently on Mac? I don't think so. Can you check if you have Growl installed/runnning, and in that case, if closing it makes any difference? If no notifications show up, please file a new bug under Core :: Widget: Cocoa. Thanks for the help!
Comment 22•11 years ago
|
||
There was some Growl framework that came with the OS, but no app/pane/options to work with it. I didn't find anything related to it in the running processes list either. => Notifications didn't work at all. Installed Growl 1.2.2 and let it run => Notifications didn't work. Stopped Growl => Some notifications were displayed (new Notification("Title", { body: "Foo\nBar" });), but very few. Removed Growl => Notifications didn't work. Reinstalled Growl => Notification didn't work with Growl on, nor off. Same behavior on Firefox 23 RC, 24 Aurora and 25 Nightly. What are the expected results here?
Comment 23•11 years ago
|
||
I don't believe this bug was specific to Growl but the native OS notification on all platforms. Comment 0 has a fairly clear testcase. If that doesn't work then please need-info Rueben. Note that testing with Growl is a moot point since we dropped support for it in Firefox 22 (bug 777409).
Comment 24•11 years ago
|
||
(In reply to Anthony Hughes, Mozilla QA (:ashughes) from comment #23) > I don't believe this bug was specific to Growl but the native OS > notification on all platforms. Comment 0 has a fairly clear testcase. If > that doesn't work then please need-info Rueben. > > Note that testing with Growl is a moot point since we dropped support for it > in Firefox 22 (bug 777409). Comment 22 was an answer to Reuben's previous comment, where I was asked to also check how Growl affects this. I am waiting for him to confirm what the issue is here.
Flags: needinfo?(reuben.bmo)
Assignee | ||
Comment 25•11 years ago
|
||
I asked you to test if Growl affects WebNotifications because that would be a Widget: Cocoa bug, given bug 777409. I'll look into it and file bugs if necessary. Thanks Ioana!
Flags: needinfo?(reuben.bmo)
You need to log in
before you can comment on or make changes to this bug.
Description
•