Bug 198691 - Web Inspector: "Copy Path to Property" doesn't work with multiline keys
Summary: Web Inspector: "Copy Path to Property" doesn't work with multiline keys
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Minor
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-08 12:54 PDT by Alexey Shvayka
Modified: 2019-06-10 12:33 PDT (History)
4 users (show)

See Also:


Attachments
Screenshot of the issue (362.47 KB, image/png)
2019-06-08 12:54 PDT, Alexey Shvayka
no flags Details
Patch (1.35 KB, patch)
2019-06-08 14:48 PDT, Alexey Shvayka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Shvayka 2019-06-08 12:54:43 PDT
Created attachment 371664 [details]
Screenshot of the issue

Steps to reproduce:
1. Inspect `[{a: {b: {"\n": 1}}}]` and expand down to object `b`.
2. Right-click on "\n" property, "Copy Path to Property".
3. Paste from clipboard, you get:

```
$1[0].a.b["
"]
```

Which is not valid and causes SyntaxError when executing.
Comment 1 Alexey Shvayka 2019-06-08 14:48:22 PDT
Created attachment 371668 [details]
Patch
Comment 2 Matt Baker 2019-06-10 11:50:07 PDT
FYI, Chrome devtools shows: `b: {"↵": 1}` in the console.
Comment 3 Matt Baker 2019-06-10 12:02:10 PDT
Comment on attachment 371668 [details]
Patch

r=me, nice catch.
Comment 4 WebKit Commit Bot 2019-06-10 12:32:06 PDT
Comment on attachment 371668 [details]
Patch

Clearing flags on attachment: 371668

Committed r246271: <https://trac.webkit.org/changeset/246271>
Comment 5 WebKit Commit Bot 2019-06-10 12:32:07 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-06-10 12:33:18 PDT
<rdar://problem/51592479>