Empty "styled unit" in console.log renders as a space

RESOLVED FIXED in Firefox 60

Status

defect
RESOLVED FIXED
a year ago
11 months ago

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Tracking

Trunk
Firefox 60

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
Steps to reproduce:
1. Open the console
2. Evaluate `console.log("%cHello%c|%cWorld", "color:red", "", "color: blue")`


Expected results:

I see the following output : "Hello|World"

Actual results:

I see the following output : "Hello | World"

---

i.e The second styled unit is wrapped by single spaces.

This is a new frontend issue only
(Assignee)

Updated

a year ago
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Comment hidden (mozreview-request)
Comment on attachment 8951671 [details]
Bug 1438442 - Fix styled console.log issue with empty style; .

https://reviewboard.mozilla.org/r/220968/#review227182

Looks reasonable, thanks.

Honza
Attachment #8951671 - Flags: review?(odvarko) → review+

Comment 3

a year ago
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/48fb17a12bb4
Fix styled console.log issue with empty style; r=Honza.

Comment 4

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/48fb17a12bb4
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
I have reproduced this bug with Nightly 60.0a1 (2018-02-14) on Windows 10, 64 Bit!

This bug's fix is verified with latest Nightly!

Build ID   : 20180225100219
User Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
QA Whiteboard: [bugday-20180221]

Updated

11 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.