Bug 255150
| Summary: | REGRESSION (Safari 16.4): clipboardData.setData removes newlines when : is in the line | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nanne Wielinga <nanne> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Critical | CC: | akeerthi, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 16 | ||
| Hardware: | Mac (Intel) | ||
| OS: | macOS 12 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=250119 | ||
Nanne Wielinga
Browser Safari 16.4, the bug was not present in 16.3
Related: https://github.com/ajaxorg/ace/issues/5112
This bug breaks copying YAML or Python code from online code editors (Ace, CodeMirror, and Monaco).
When testing, two scenarios:
clipboardData.setData("text/plain", `test1\ntest2\ntest3`)
Results into:
test1
test2
test3
And:
clipboardData.setData("text/plain", `test: 1\ntest2\ntest3`)
Results into:
test: 1test2test3
Eating up all the enters
Example: https://jsfiddle.net/102g5phr/ (updated)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
Could you please try Safari Technology Preview 167? I cannot reproduce with a newer Safari version, so I suspect that this was fixed as part of bug 250119.
Radar WebKit Bug Importer
<rdar://problem/107796207>
Nanne Wielinga
Yes, Safari Technology Preview 167 resolves the issue.