Closed Qhilm closed 1 month ago
I'm not sure what changed on the Firefox side. It was working just fine, but I can confirm that it stopped working on Firefox 117 now. It uses manifest v3, so maybe there's some problem there? You can see the recent commits if you want to investigate.
There's a known issue on Chrome (and probably Firefox), where extension contexts can't use the Async Clipboard API because it's not focused. In Chrome, this is tracked as https://crbug.com/1404835.
https://github.com/GoogleChromeLabs/link-to-text-fragment/issues/95#issue-1895851565
@Qhilm, it has worked for me using https://download.opensuse.org/repositories/openSUSE:/Factory/standard/x86_64/MozillaFirefox-122.0-3.2.x86_64.rpm on cpe:/o:opensuse:tumbleweed
from :20230915
to :20240131
.
Firefox 119 on macOS Sonoma. I no longer see the "Copy link to selected text" context menu item.
Firefox 119 on macOS Sonoma. I no longer see the "Copy link to selected text" context menu item.
you may have to click on the add-on icon once.
Seems to be working without any additional steps for me on Windows firefox 121.0.1 (64-bit)
Should works without add-ons with Firefox Nightly 131 (Seems chance run at 1 October for stable release and at 24 June 2025 for ESR 140+).
MacOS Sonoma 14.7 Firefox 131.0.3
I wonder if the issue was the fact that I was already on a page loaded via a text fragment link. But if so, why would reinstalling the extension not help at all?...
Unfortunately, I can't tell which version of the extension I had before reinstalling. After the first step, I also visited the about:addons page, which may have triggered a silent update? Any way to get/provide some logging or so from the user side here from the extension?
@dotproto Could the above https://github.com/GoogleChromeLabs/link-to-text-fragment/issues/95#issuecomment-2422326148 be related to the trick you mentioned in https://github.com/GoogleChromeLabs/link-to-text-fragment/issues/108#issuecomment-2414185289? Is it a full replacement of the service worker?
I also need an offscreen document for the clipboard: https://github.com/GoogleChromeLabs/link-to-text-fragment/blob/84c592c3754ff3259cc4e473865dbd8a8def2396/service_worker.js#L24
@tomayac
New (yesterday's, v2.5.0) release broke it for me on Firefox.
When using "Copy Link to Selected Text" the following error appears in Browser Console and no link is present in clipboard ☹️
Uncaught (in promise) ReferenceError: clients is not defined
setupOffscreenDocument moz-extension://7eab01c8-a082-47c5-8325-33b93f3f9759/service_worker.js:29
onCopy moz-extension://7eab01c8-a082-47c5-8325-33b93f3f9759/service_worker.js:167
<anonymous> moz-extension://7eab01c8-a082-47c5-8325-33b93f3f9759/service_worker.js:126
[service_worker.js:29:26](moz-extension://7eab01c8-a082-47c5-8325-33b93f3f9759/service_worker.js)
Rolling back to v2.3.2 makes the extension work again.
Running on Firefox 131.0.3.
Alright, rolled back to v2.3.2
. @dotproto, the trick from https://github.com/GoogleChromeLabs/link-to-text-fragment/issues/108#issuecomment-2414185289 unfortunately doesn't seem like a drop-in replacement after all. The validation when uploading the new version could have caught this: https://github.com/GoogleChromeLabs/link-to-text-fragment/blob/84c592c3754ff3259cc4e473865dbd8a8def2396/service_worker.js#L29
I successfully copied a link yesterday, same machine. Didn't look at the version, I just gave it a shot and was happy it worked. So I assume the rollback did the trick for now. Thanks!
Thanks for confirming! We're in a funny world right now where Firefox continues manifest v2 support and has partial manifest v3 support, and where Chrome phases out manifest v2 support and forces a manifest v3 migration, which it fully supports, but which lacks rich clipboard support in service worker offscreen documents (https://crbug.com/1404835). This is not a problem on Firefox, though, as we can remain on the manifest v2 version, so closing this Issue.
Currently, the only way to get it to work on Firefox is:
These steps must be repeated for every link, hence it's not very usable anymore.
Example link: https://blog.chromium.org/2019/12/chrome-80-content-indexing-es-modules.html#:~:text=ECMAScript%20Modules%20in%20Web%20Workers
Firefox 117.0.1 macOS 13.5.2