Line break missing in Developer Console Object Properties Panel

UNCONFIRMED
Unassigned

Status

P3
normal
UNCONFIRMED
a year ago
2 months ago

People

(Reporter: mtg.ken.lam, Unassigned)

Tracking

55 Branch

Firefox Tracking Flags

(firefox57 fix-optional)

Details

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Steps to reproduce:

Here is a sample script for you to test in JavaScript Scratchpad:

/* Start of script */

var multilineMessage = "Dear Firefox Developers,\nWhy is the line break removed in the Properties Panel?";

console.log("Line breaks in strings can be shown in pure text console.log():\n", multilineMessage);
console.log("With an object with multi-line string property, the line break is not displayed in the console output, though it is still understandable:");
console.log({longText: multilineMessage});
console.log("However, when you click the object and inspect and edit it in the Properties Panel, the line break is missing. This is not good because:\n" +
           "1. The line break is lost when we copy the text and when we edit it.\n" +
           "2. The display is not good as well. We are already inspect a single object, why would it hurt to show the line breaks?");
console.log("Suggestions:\n" + 
           "a) Use a multi-line editor for editing string properties of objects.\n" +
           "b) For display, do not show the line breaks by default, but allow expanding it by providing a button to click on.");

/* End of script */

Just run it and you will notice my question: why is the line break removed in the Properties Panel?

Line breaks in strings can be shown in pure text console.log()

But with an object with multi-line string property, the line break is not displayed in the console output, though it is still understandable.



Actual results:

However, when you click the object and inspect and edit it in the Properties Panel, the line break is missing. This is not good because:
1. The line break is lost when we copy the text and when we edit it.
2. The display is not good as well. We are already inspect a single object, why would it hurt to show the line breaks?


Expected results:

The line break should not be removed inside the Object Properties Panel.

Suggestions:
a) Use a multi-line editor for editing string properties of objects.
b) For display, do not show the line breaks by default, but allow expanding it by providing a button to click on.
Component: Untriaged → Developer Tools: Object Inspector
status-firefox57: --- → fix-optional
Priority: -- → P3

Updated

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