New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 614492 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Regression: double clicking text in a JSON line in a Network->Preview tab has different behavior.

Project Member Reported by rkaplow@chromium.org, May 24 2016

Issue description

Version: 52.0.2739.0
OS: likely all (mac/linux at least).

What steps will reproduce the problem?
In devtoos, if you go into Network tab.
If you select a particular request, and in the Preview tab, if you double click an entry in the request something changed. It must be on a JSON object.

Previous (50.0.2661.104 - crOS stable).
Double clicking on the text, would select everything. You could then copy/paste. It would also turn newline chars (rendered as arrows) into just whitespace.

Current 52.0.2739.0 - double click just selects the word. Hovering over still shows the same thing (the text with the newline chars rendered as whitespace)

Not sure if this was intended or not. 

 
Owner: allada@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by allada@chromium.org, May 25 2016

Status: WontFix (was: Assigned)
This was intended. I refactored a bit of the JSONView recently and found that it was trying to make the JSON non-editable, but was doing it improperly.

I changed the code to reflect what it should be doing. If you/others believe it would be nice to have it the way it was I can discuss it with some the rest of the team.

I am going to close this issue, but feel free to escalate it or re-open it if you feel strongly about it.

Thanks!

(File & CL [very bottom]: https://codereview.chromium.org/1912973002/diff/80001/third_party/WebKit/Source/devtools/front_end/network/JSONView.js )
Status: Assigned (was: WontFix)
Re-opening the bug, since I do feel strongly about it. :)

With the new implementation, I'm not able to copy at all on Mac. If I do Cmd-C, it doesn't copy what I have selected and if I right-click the Copy item is removed.

Also, separately - if the JSON content has newlines, I would expect those to be copied as newlines and not as "↵". Maybe this part can be treated as a separate bug - but at least before, they were replaced with spaces (not optimal either), but better than "↵". Ideally, it would just preserve the newlines that was in the content.

Comment 4 by allada@chromium.org, May 26 2016

It does not appear to be extremely difficult to make it readonly + non-editable. However, would a right click "copy value" be better than double click -> ctrl+a -> ctrl+c?
I think double-click & copy is pretty intuitive (since double click is how you select all - at least on OS X) and right-click would be less discoverable. However, right-click -> copy would still be better than the current new behavior.

By the way, my stable Chrome OS X just updated to M51 which actually has the exact perfect behavior. It's previous "right click" -> "select all" behavior but with newlines no longer being turned into spaces. So I can copy the exact content of that JSON string value, which is exactly what I want. So I really hope that behavior can be restored.

Comment 6 by allada@chromium.org, Jun 20 2016

Cc: chowse@chromium.org
Tagging chowse@ for further discussion.
Hi, any updates on this? Happy to also chat offline if it would help.

Comment 8 by chowse@chromium.org, Jul 15 2016

Could you clarify what the previous/expected behavior is? On Win/OSX, the convention of double-clicking on text is to select a "word" (in the case of JSON, any adjacent non-word-breaking characters), and triple-clicking selects the entire field (i.e. the entire value of the key-value pair). This is seems to be the current behavior on stable (51.0.2704.103).

I'm with allada@ in comment 4 that a "Copy value" option might be the most straightfoward choice, even if it's less intuitive. For a lot of JSON values, it appears we do a lot of text clean-up (e.g. converting newlines to ↵, truncating long strings/arrays/objects, etc.) that make the value more readable, but not an accurate representation of what you'd want to copy. The alternative is to "unformat" the selection on copy (which gets messy if you only copy part of the text).

One other option is to make the readonly+noneditable JSONView allow you to open a textfield when you double-click on a value, but make the textfield read-only (i.e. you can select and copy, but not modify it). This would still suffer the shortcomings mentioned before about newlines/truncation, unless the textfield shows the original unedited value. I'll defer to allada@ on how difficult this would be to do.

Comment 9 by allada@chromium.org, Sep 21 2017

Status: WontFix (was: Assigned)
Since this can be solved by looking at the raw JSON I am going to close the bug.

Thanks for the report!

Sign in to add a comment