copying and pasting multiple images from the web in a row breaks previous ones
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox118 | --- | wontfix |
| firefox119 | --- | wontfix |
| firefox120 | --- | verified |
| firefox121 | --- | verified |
People
(Reporter: vogon, Assigned: edgar)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 external file)
|
445.51 KB,
image/png
|
Details |
hi there! I'm one of the developers on cohost.org, and we received a bug report about pasted images for which we believe the root cause to be a clipboard behavior regression in a recent version of firefox.
I wrote a minimized repro on jsfiddle: https://jsfiddle.net/d9cegwbm/1/.
steps to reproduce:
- open the repro.
- open https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Arizona_Diamondbacks_cap_logo.svg/1200px-Arizona_Diamondbacks_cap_logo.svg.png.
- right click, copy the image; tab back to the repro, select the bottom-right pane and paste.
- open https://upload.wikimedia.org/wikipedia/commons/0/0f/Boise_State_Athletic_%22B%22.png
- right click, copy the image; tab back to the repro, select the bottom-right pane and paste.
expected behavior: both "A" and "B" should show up in the document.
observed behavior:
- chrome 117: works.
- firefox 102: works.
- firefox 117.0.1: doesn't work; after pasting "B", "A" becomes a broken image.
note that this issue only happens with copy-pasted image data from the web; if you copy-paste files from disk, everything works normally in firefox 117.
hope this is enough information to diagnose the issue! please feel free to contact me if there's any other help I can provide.
oh! I should also note: this appears to be particular to the copying web browser's clipboard handling, rather than the pasting browser. during the process of attempting to root cause the bug, I found that copying from images in firefox 117 tabs and pasting into chrome was also broken; conversely, copying from chrome into firefox 117 works fine.
one more note that I forgot to add: all of my testing was done on Windows 10 -- and our original reporter also uses Windows 10 -- in case this is a platform-specific bug.
Comment 3•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Copy & Paste and Drag & Drop' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
a few more data points: the bug appears not to be present in Firefox 117.0.1 on Linux, or Firefox ESR 115.2.1 on Windows or Mac. I believe this is a Windows-specific bug, so I'm changing the platform on it.
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 5•3 years ago
•
|
||
(In reply to Colin B. from comment #1)
I found that copying from images in firefox 117 tabs and pasting into chrome was also broken.
Yes, I see also this way back to Firefox 70, so it's indeed something related to the data we put into system clipboard.
When copying image via contentmenu, we also put file type into system clipboard, where Chrome doesn't.
This issue didn't occur before is because we didn't get file type from clipboard, and after bug 1699743 we do, so now we run into the issue as Chrome. Not sure why we need to put file type into system clipboard while copying image through.
Comment 6•3 years ago
|
||
:evilpie, since you are the author of the regressor, bug 1699743, could you take a look?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 7•3 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #5)
Not sure why we need to put file type into system clipboard while copying image through.
This is from https://searchfox.org/mozilla-central/rev/699a7704521354cac1e6a0679029c89ca899e25c/dom/base/nsCopySupport.cpp#504-507 which is to fix bug 664717.
| Assignee | ||
Comment 8•3 years ago
|
||
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Set release status flags based on info from the regressing bug 1699743
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
| Assignee | ||
Updated•3 years ago
|
Comment 11•3 years ago
|
||
Backed out bc failure browser_save_filenames.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/bbccd8fb6efc43d30d61e6f28d8f1fe545b59d58
Log link: https://treeherder.mozilla.org/logviewer?job_id=430803343&repo=autoland&lineNumber=65907
Updated•3 years ago
|
| Assignee | ||
Comment 12•3 years ago
|
||
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
Backed out changeset 1e91f547f0c7 (bug 1854747) for causing bc failures at browser_save_filenames.js
Backout: https://hg.mozilla.org/integration/autoland/rev/6d9a378efcee8715e59a32d21a70a64adfca6313
Failure log: https://treeherder.mozilla.org/logviewer?job_id=431491355&repo=autoland&lineNumber=12736
| Assignee | ||
Comment 15•3 years ago
•
|
||
Comment 16•3 years ago
|
||
| Assignee | ||
Updated•3 years ago
|
Comment 17•3 years ago
|
||
| bugherder | ||
Comment 18•3 years ago
|
||
The patch landed in nightly and beta is affected.
:edgar, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox119towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 19•3 years ago
|
||
I don't plan to uplift this to beta as I would like to run full Nightly cycle to see if there is any feedback first.
Updated•3 years ago
|
Reproducible on a 2023-09-22 Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 121.0a1 on Windows 10.
However, this issue is still reproducible on Firefox 120.0. Should I file a new bug for this behavior? Thank you.
| Assignee | ||
Comment 21•2 years ago
|
||
The fix is only applied in Nightly and beta for now, bug 1857764 is filed to apply it to all channel.
Thank you for the clarification! Just noted that the fix is implemented in early beta only, and I can confirm that the issue does not reproduce on Firefox 120.0b4. Sorry for the confusion. Marking as VERIFIED FIXED based on comments 20 and 21.
Description
•