Closed MarkBennett closed 3 years ago
Thanks for the report @MarkBennett , I was able to reproduce the issue.
Note: Not reproducible on Windows with clean profile.
Tested with: Browser / Version: Firefox Nightly 68.0a1 (2019-04-11) Operating System: MacOS 10.14.4
Moving to Needsdiagnosis for further investigation.
Thanks @softvision-oana-arbuzov! Let me know if there's anything I can do to help. I've got a CS degree and have done lots of JS, etc. so I'll provide whatever details I can. ;)
Thanks @MarkBennett, for now it's ok, we will let you know if extra info is needed.
Okay, this is surprisingly complex. The core issue here is that this site is trying to document.execCommand('copy')
inside a web worker. Clipboard events are only permitted if they are called within event handlers triggered by user-generated event. A function running inside a web worker is, by current definition, not part of this, so Firefox "correctly" rejects the call here for security reasons.
There are recent discussions in the W3C TAG to allow passing that user activation flag via postMessage
to other scripts, including web workers. This issue and its linked PR describes the spec changes to make this possible.
However, none of the PRs are merged and the discussion is still ongoing. This is one of the things where Chrome, unfortunately, decided to implement behavior that's not fully agreed upon yet. For us, though, there isn't much we can do besides waiting for the results of those spec discussions and changing Firefox behavior after that. So from a browser developers perspective, this issue is a no-op right now.
We could try to get in touch with the Canada Post developers, but seeing that they tucked away that logic neatly into a web worker, I am almost certain adding a workaround for Firefox is not an option. We may be able to reconsider this if the spec develops in a different direction and the site needs to be changed.
I'm following the spec issues linked above, and I've needinfo'ed myself here, so I can follow up when time is due. But for now, there is nothing we can do here...
Interesting insights and great analysis @denschub. Too bad it looks like the behaviour is to spec, whereas Chrome is not, but I appreciate that Firefox is preferring to err on the side of the spec.
I'll file a bug/complaint with Canada Post and will also follow the issue you've linked to.
Thanks for the follow up! :)
Let's close this as sitewait as @MarkBennett has contacted/will contact Canada Post. Thanks!
I can confirm I've contacted Canada Post using the report an issue form on their website. No response yet, but I supplied a link to this issue in my report.
I'm satisfied if you want to close on this end.
oops my bad. I meant /let's move/ instead of close. We are all good. Thanks a lot @MarkBennett We will close it when the issue has been fixed on the site.
The issue is still reproducible on my side.
Tested with: Browser / Version: Firefox Nightly 69.0a1 (2019-06-11) Operating System: MacOs 10.14.4
This is still reproducible.
Tested with: Browser / Version: Firefox Nightly 74.0a1 (2020-01-13) Operating System: Windows 10 Pro
@MarkBennett is there an update here? :)
I've sent a support email but haven't heard back directly. I assume this is stalled on their end, but don't have any specific information.
This seems to be fixed both on Mac and Windows, the link is copied.
Tested with: Browser / Version: Firefox Nightly 90.0a1 (2021-05-25) Operating System: Mac OS Big Sur v.11.13.1, Windows 10 Pro
@MarkBennett does it still occur on your side?
URL: https://www.canadapost.ca/trackweb/en#/search?searchFor=LM114954875CA
Browser / Version: Firefox 68.0 Operating System: Mac OS X 10.14 Tested Another Browser: Yes
Problem type: Site is not usable Description: When sharing a link to track a package, the "Copy" button doesn't work Steps to Reproduce: I opened a tracking link (LM114954875CA) then clicked the "Share" link at the top. In the dialog that opened I clicked "Copy".
There were no errors in the UI, but the link wasn't copied.
In the console I saw:
"document.execCommand('cut'/'copy') was denied because it was not called from inside a short running user-generated event handler."
I tested this an it works in Chrome 73 (latest stable)
Browser Configuration
Console Messages:
Reported by @MarkBennett
From webcompat.com with ❤️