Copy and Paste context menu entries sometimes disabled when they should not be
bugzilla.mozilla.orgNot sure why this is big news, big enough to be in the #1 spot right now. From reading the comments on the bug, it seems to be an issue that's hard to reliably reproduce, and -- despite how simple it sounds from the editorialized HN title -- it involves interactions between different parts of the browser, and it's hard to track down and fix.
Nonetheless, there are some proposed fixes, and I expect a near-future release will have one of them.
This isn't that stereotypical "simple bug has been sitting around unresolved for years because (arrogant|understaffed|uncaring) developers can't be bothered" story that is unfortunately all too common in software (and not just open source software -- we just don't get to see it on a public bug tracker when it's in a proprietary product).
This is the process working.
This post has 100 points right now and there are already 10+ people in the comments saying they have experienced it. Given the typical distribution of lurkers, I’d say a good proportion of the votes come directly from people who think they’re affected. Probably more people wrongly attribute this kind of annoyance to websites. Bugs in popular software just affect more people, hard to reproduce or not.
Not sure why you’re so defensive and eager to shut it down that you have to post a barrage of comments to this thread, including saying roughly the same things in three comments.
I don't agree. This is something so basic that there isn't, from a Q&A standpoint, a justification for it ending up broken for 2/3rds of a year, and where the kind of hard-line stance Linus takes against certain kinds of regressions is warranted. Also consider that a lot of users have been unhappy for years with how the foundation is running and spending money (e.g., more and more on things unrelated to FF, like this: https://blog.mozilla.org/en/mozilla/introducing-mozilla-ai-i...).
>it seems to be an issue that's hard to reliably reproduce
You say that like the unreliability is the result of some extrinsic influence like the weather or unfair portrayal of the project by journalists and not a strong sign that the project has unmanageable tech debt or does not have the human resources necessary for the difficult task of competing with Chrome.
This is a bug in a very obvious location that is triggered, in my experience, all the time.
It's easy enough to work around, but it's also just terrible optics. Why does something like this take the better part of a year to fix?
i thought i was crazy but had enough times where copying didn't work and i thought it was my computer but seems i wasn't crazy
If anyone is curious about another 'fun' Windows only bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1856462
From the bug report:
1. Open https://www.google.com/ in a tab
2. Open https://ftp.mozilla.org/pub/firefox/nightly/ in the same tab
3. Click on Go back button (or Alt+Left Arrow)
4. Click on Go forward button (Alt+Right Arrow)
5. Select some text
6. Right click
It doesn't seem like it's a website doing something it shouldn't be and breaking RFC. It's really a bug in firefox.Also, the scope is very specific and kinda justifies it being low priority. Maybe.
Note that there is another reproduction step sequence that I chose not to put in this comment for the sake of simplicity.
It's not generalizable to any arbitrary pair of websites X and Y. Or even X and ftp.mozilla.org. Which I suppose makes sense if it's been in the wild this long without everyone noticing it.
I am able to reproduce this but I noticed that Ctrl+C, Ctrl+V still work even though the `Copy` menu item was disabled. So it is a visual glitch, at least on my machine.
I've noticed this randomly lately. I think it's this bug anyways. The copy and paste menu items are disabled but ctrl-c/v works. On websites that make no sense to have it disabled.
I can't reproduce this at all.
Confirmed on Windows 10 64-bit with Firefox 127.0.2. After right-clicking, the Copy menu entry is disabled. Switching to another tab and back fixes the issue.
I can reproduce. Firefox 127.0 under wayland, arch linux
Which compositor? I'm trying on 127.0.2 and can't seem to do it, and I'm on kwin_wayland.
There's a joke somewhere in here about trying it locally, but I can't quite... Nevermind.
It works on my machine!
Repeating that joke over and over again is key to a full career in software engineering.
Ah! Perfect. On 127.0.0.1 it works just fine.
I can reproduce as well using FF 127.0.2 on x11, ubuntu. But I can make it even odder. Select the text, right click, copy is grayed out. Hit the back button without any other interaction, then go forward again from google.com and the text will still be selected. Hit right click again, and copy is now possible. Select any other text, and it is working as expected.
So I opened dev tools and saw there were network requests for google.com and play.google.com on the ftp page when it loaded even though there is nothing in the page source that would make those requests. When I force reload with cache disabled, these requests are not present. This looks like bad behavior by google.com somehow leaking into the next page.
So I found another random ftp page, and I can reproduce all of this there: https://ftp.wildfire.gov/public/incident_specific_data/
Is it the lack of js, not something more arcane in the ftp templating on those sites? I can reproduce all of this at http://motherfuckingwebsite.com/ which is js free, and also at https://news.ycombinator.com/, which has js (be careful to select something like "### points" below a post, which has no hyperlink)
EDIT: I guess my theory was wrong, because I read at the bottom of the bugzilla:
So the issue here is that when a page goes to BFCache, it'd set the active browsing context to null, and the page that is about to show would update the active browsing context to itself. And these two operations are racy because they are triggered in different processes with different actionId. We are going to explore some potential solutions.
Based on the comments there, by setting BFCacheInParent to false in about:config, this bug is gone for me.
I'm able to reproduce this on vanilla Linux Mint, FF version 127.0.2.
I've recently switched from Firefox to Edge until they fix this bug. Every now and then I go back to Firefox hoping it'll be fixed, and then it bites me again.
Now you have 10 problems. But it's always a matter of choosing the problems you want, I guess.
I might argue that this is quite minor in the face of... well... a Microsoft controlled browser, but what do I know
Can't reproduce it on Wayland
This happens often enough to notice (I have seen it a few times) but not really often enough to seriously frustrate me. At least on Wayland it's enough to unfocus and focus the Firefox window for me, then Copy is not greyed out anymore.
I know the kneejerk reaction is "how could something so basic be broken in any way???" but realistically I think it's just a testament to how complex the entire codepath of something as simple as a "copy" menu item has gotten. I mean reading the bug report, it looks like it weaves in and out a surprising number of different components in complex ways involving IPC. It makes sense but at the very least I still never think of a simple UI element like a copy button having this much going on.
Specifically the right-click menu option, which is often greyed out for no apparent reason. This happens on both Windows and Linux. Ctrl+C still works, but how does Firefox break something as basic as the right-click menu and copy in 2024?
Because the bug involves sending and receiving messages to multiple other processes. Each webpage you visit is potentially in a different process, and each of those processes maintains its own selection state (that state is visible to javascript running in the page, and you don't want to leak what you copy on this page to any other, so it would be hard to put it anywhere else). There is only one context menu though (in the main process), so it has to send a message to the content process to find out if anything is selected or not. It seems that somehow the message is going to the wrong content process, to a page where nothing is selected. The context menu itself then displays exactly the right thing, based on the data it got back.
I hear what you are saying but the entire architecture is build around IPC message passing. A lot of user interaction will work the same way. There is nothing inherently more difficult about this scenario than many others within Firefox.
If it has such a convoluted code path that it cannot even be debugged then that’s an issue with the architecture, not that the user has a crazy difficult edge case which every other browser seems to manage.
Judging by the comments a lot of people in this thread have been affected by this issue.
It's a caching issue, so it's by definition as tricky and elusive as a sasquatch.
There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.
> Judging by the comments a lot of people in this thread have been affected by this issue.
I'm sincerely surprised by how many people on Hacker News are apparently copy/pasting with the context menu rather than using Ctrl+C.
PSA for some common keyboard shortcuts:
Alt+Left to navigate back (Alt+Right to navigate forward)
Ctrl+T to open a new tab (Ctrl+Shift+T to reopen previously closed tab)
Ctrl+N to open a new window (Ctrl+Shift+N to reopen previously closed window)
Ctrl+Shift+P to open a new private window
Ctrl+W to close the current tab (Ctrl+Q to close all windows)
Ctrl+R to reload the page (Ctrl+Shift+R to do a forced reload of cached assets)
Ctrl+Plus to zoom in (Ctrl+Minus to zoom out, Ctrl+Zero to reset zoom level)
Ctrl+Tab to focus the next tab in line (Ctrl+Shift+Tab for the previous tab in line)
Alt+One to focus the first tab (Alt+Two for the second tab, etc.)
Ctrl+F to search the text of the page (/ (forward slash) for quick find)
A person selecting text on a webpage is usually using the mouse already. It's reasonable to use the same device to choose the copy command.
Sometimes people gotta jerk, and that leaves only one hand free, which means. Mouse for interaction, Obviously.
But more seriously - FF isn't vim and no I'm not installing vim keybindings. And I do use the keyboard a lot (I've had to teach coworkers the tips for tab navigation for example), when in "type/entry" mode (oh maybe VIM is the right metaphor hmm).
Anyways, sometimes you're just chilling with a few tabs and wanna pop back and forth between a few, and not be in type mode... So mouse it is. And if you're using mouse and hand off the keyboard it's far easier to just use the right click (I've only started doing this the past year or two... likewise I've taken to right click, back from the popup menu instead of dragging mouse across to the back arrow. (but if on keyboard yeah I alt-arrow it).
What i love is how everyone just demands everyone use the interface the exact same way for all purposes and times.
I do get frustrated at my roomie who won't just do it my way, when I ask her to search for something or I'm trying to help with something technical and she's in control of her laptop... though, and in those times I'm 100% right and legit. That's the only exception to my paragraph above.
> maintains its own selection state
This is the real bug. Why is it not global?
Probably related to how if you go to google, leave the browser for terminal or ide, you still get a google hover text that brands everything else on your desktop depending on where your mouse was when you left the browser.
For one thing, the selection state is visible to the webpage. For another thing, the webpage is where the text lives. Put that way it sounds funny, but think about it. You have a bunch of content processes, each of which is in charge of loading some number of webpages that the user wants to have open. There is a single UI process that the user can interact with. When the user actually initiates a copy, the UI process doesn’t know what text to put into the clipboard. The text is all in the content process! The UI process merely has to figure out which content process to send the messages to, so that the right text ends up in the clipboard. And that's more complicated than it looks because any given page you are looking at might be stored in multiple processes. A page on domain A with a frame that has content from domain B will often have a different content process for both domains, to ensure maximum separation of state between them.
The bug appears to be a race condition in how the state of which content process has the most recent selection is synchronized with the UI process. The patch at the end of the bug report changes it so that when the user unloads a page no message is sent to delete that state. Instead, only whatever page gets loaded or switched to next will send a message to replace the state. This should eliminate the problem.
Left–over tooltips are a completely different kind of problem.
I have been affected by this one on my Ubuntu desktop for months. It is very annoying! Ctrl+C also works for me, but I am so used to right clicking it really throws me off.
This has been driving me crazy on both Windows and Linux as you say.
This has been happening to me on MacOS as well
The website you are visiting might be breaking it. There are many sites which will force that option to grey out upon right-click.
This is by design.
> The website you are visiting might be breaking it. There are many sites which will force that option to grey out upon right-click.
No, this is a new thing that happens on sites that weren't and aren't doing that. Also tab-switching fixes it.
I'm pretty sure that merely tab-switching hasn't fixed it for me. I've done both mouse and alt-tab, i've ctrl-w'd the tab and ctrl-shift-T'd it. I've opened the same site in a new tab and it still wouldn't work. I've had to completely shut the browser down. Maybe it's different between Windows and Linux, perhaps (I'm using Windows for this).
Maybe there's more than one cause, but the reason I hate this bug so much is because simple fixes like just alt-tabbing or even closing and re-opening or full-reload doesn't work. I'm like 99% certain that's the case. I'll have to verify next time this happens. It seems to happen at least a couple times a month.
Clicking the URL bar once always fixes it for me.
Many websites will also prevent highlighting text as well. Reader mode is helpful for that.
Or just hold down shift, at least in Firefox. This avoids sending the events to the javascript on the page so that the user can act on the page without being blocked, while still using a page’s own context menu if it really does provide a useful one (Google Docs, for example, has one with actual editing actions in it).
It's the duty and responsibility of a properly implemented browser to not allow a "website" to break basic UI functionality because it pushes some javascript. I don't care about how Safari and chrome and edge do it. Firefox should not follow their lead.
This is a fine example of why people install plugins like ublock origin and similar.
Firefox does it best here, because you can hold shift to get the original context menu back when the page blocks it or provides their own.
Exactly. There are legitimate use cases for hijacking the right-click menu to make it better. For example, Google docs, GMail, etc. The best solution IMHO is the shift key to get the normal menu. It's the best of both worlds.
They're also deleting downloaded .pdf whilst in private mode. Yes even when I click save as. It gets downloaded to my downloads folder and then sometimes it's deleted when I close the browser. Sometimes.
It's not a bug, it was designed this way: https://bugzilla.mozilla.org/show_bug.cgi?id=1790641#c11
That being said, I hate it, it's awful UX. If something is in the "Downloads" folder, it should never be automatically removed, it's not "Temp".
Not to mention that there's absolutely no indication in the UI that your downloads will be deleted. Also, there's no obvious way to make the downloaded file permanent, other than manually copying it outside the "Downloads" folder.
Comment on the bug. Private mode should save to a Downloads/temp folder, and the Download/Save UI should offer an "export/keep" function.
That's actually a comfort to hear.
I use private browsing when doing legal work so an errant Google session doesn't hoover up anything it shouldn't, and I've had so many random documents and briefings just disappear that I'd convinced myself that I was just mistaken about saving them.
Oh, so that's why some files sometimes are auto-forcibly-downloaded into the usually-unused download directory which I had named ~/Downloads/wtf-firefox/ for now-obvious-but-previously-noticable "what the fuck" reasons. Didn't know that it was being emptied behind my back though!
That's really worrying. Can you reproduce it?
Quite a lot of the time yes. But the existing bug tracker issue is full of comments and a disgruntled employee has locked further comments.
about:config and set this to true "browser.download.start_downloads_in_tmp_dir"
Oh my God! I thought it was just me and some silly "we only enable copy for sites without iframes (or something security related) feature". I was quietly hoping someone here had the secret "type 'unprotected pasted' in the devtools console" solution
I get that maintaining browsers is hard, but it feels like Firefox has been slowly falling behind in terms of supporting and expanding on its core functionality. I experienced this copy bug for a long while now (for some reason, visiting Wikipedia seems to trigger it most often), and any such hitches seem to take months to resolve. It took five months[1] for Mozilla to fix an issue that made YouTube borderline unusable, especially on higher resolutions. Features like HDR video support have been requested for years and are seemingly not coming despite every other browser supporting it for ages. And yet, there's no viable non-Chromium alternatives.
Super annoying bug, you can fix it by clicking url bar and then trying right click again and it fixes it temporarily until next time.
Ha! My dad was telling me this was happening on his Mac, but I didn't believe him!
I use Linux, so initially I assumed it was some weird Linux thing. Until it happened on my father's brand-new Win-11 notebook. This is embarrassing and disappointing. I'm old enough to have used the Mozilla Suite (now SeaMonkey) betas in 2001 and had no reservations recommending early stable versions to friends and family members over IE. Same with Firefox ten years ago. Now? If asked what I'd recommend, I'd honestly tell them idk.
Funny thing is I use Firefox beta and developer editions a lot in Mac and Linux devices and haven't had a problem yet with this bug... (Also my dad is a bit messy with computers sometimes, that didn't go in favor of his credibility)
> Per comment 72, the team responsible for this bug is working to fix it. More +1 and advocacy comments aren't helping that happen faster but are adding unnecessary noise to this bug. A reminder that there are etiquette expectations when interacting in Bugzilla - it's not a free-for-all discussion forum. https://bugzilla.mozilla.org/page.cgi?id=etiquette.html
> I'm restricting comments to keep further discussion focused where it needs to be on fixing this bug and getting it into a shipping release as soon as can be reasonably done.
Gawd, I can't wait[1] for this to be fixed. It's been annoying the %*^@ out of me for a couple of months now. The only saving grace is that Ctrl+C still works, but it's still frustrating as hell. :-(
That said, I'm not gonna slag the Mozilla developers over it. I have places where I wish the Firefox crew approached certain things differently, and I've criticized them for not being responsive to the community in the past. But this seems like something that isn't easy to fix, but which they are committed to fixing. So I'm happy to just wait it out.[2]
[1][2]: "can't wait" -> metaphorically speaking, of course. :-)
I try to use Firefox a lot. One of the main issues I have is 4K video on YouTube gets stuck and skips a lot of the time on Windows 11 when using Firefox. I’ll then just play it on chrome and it plays flawlessly. It’s not the internet connection (1 Gbps) and not the graphics card (4080). Anyone else having this issue?
I've had a similar issue with YouTube and it turned out to be AV1. You seem to have quite new GPU compared to me so I guess AV1 isn't a likely culprit, but perhaps Firefox is unable to offload AV1 to the GPU even if supported?
For me this caused YouTube to use CPU for AV1 decoding (as my GPU has no decoding support), resulting in stuttering, dropped frames etc. I disabled AV1 support in my browser so that YouTube is "forced" to serve me VP9 and after that video decoding was offloaded to my GPU resolving the issue.
YouTube started serving AV1 by default rather recently for the higher bitrate quality settings.
I switched to Edge because of this bug.
"I got annoyed with the occasional inability to use the 'Copy' menu item and couldn't fathom training my muscle memory to instead use ctrl+c, so I switched to a browser that spies on me and actively ignores my consent."
I really don't get how people work, sometimes. Stuff like this tells me the privacy fight is just completely unwinnable. It's not even that people don't care; people actively make choices that make their privacy situation worse, because apparently enduring the most minor of annoyances is unthinkable as an alternative.
(And this isn't even an unloved bug that someone arrogantly thinks doesn't matter, and has been languishing for years. It's actively being worked on, and it turns out the various interactions involved makes tracking it down and fixing it difficult. And it looks like there are patches that might fix the problem after all.)
> the privacy fight is just completely unwinnable
I'm afraid it is, in the current state of things.
Another depressing example is how we collectively seem to accepted to keep referring to "unique fingerprinting and observation throughout any activity of the web and apps" as "Cookies! :))", while way too many people even blame EU privacy laws for all the purposefully annoying and misleading dark patterns used by the very entities spying on them.
But you can't blame anyone for choosing convenience and preference over a threat that is utterly overwhelming to mitigate, to the point of feeling impossible to avoid anyway.
Not to mention that a number of people rely on very specific UI features -- OP could well be my colleague, who has a muscular condition and simply cannot press "Ctrl + C" without discomfortable effort, or by constantly moving his other hand between mouse and keyboard. Others in turn may even be completely unable to do either, and fully rely on a pointer device to use GUI applications.
The only chance to win the privacy war is by providing and maintaining free and open alternatives that respect and protect your privacy, and are not only on par with, but better and more user friendly than the existing spyware.
I really don't get how people work, sometimes.
Same. I can’t fathom having a reaction like this to someone using a web browser that I didn’t.
> Stuff like this tells me the privacy fight is just completely unwinnable
Mozilla has done so many things to weaken users' trust in it (like this: https://news.ycombinator.com/item?id=39166801) that at this point many regard them as the least worst (rather than best) alternative to the competition when it comes to privacy and the open web.
I'd like to hope that Ladybird will give us a genuine alternative, but Google has ensured that current web standards are so complex that even MSFT (another megacap tech company) threw in the towel on maintaining their own browser engine.
I mean, yeah I don't care if Microsoft realizes I'm a parent and want to buy diapers. I've been using Firefox since it was version 0.1 and was called Phoenix, and I used it because it was better than Internet Explorer 6 and had themes and add-ons and tabbed browsing.
Current Firefox hasn't introduced anything unique to the browser and that's why their share is continuing to dwindle. Edge supports vertical tabs natively without any weird hacks to userchrome.css. Arc has an easy way to hide all browser chrome as well as "mini Arc" for different pages. Vivaldi has mouse gestures, etc.
I got scared away from Edge with its 10 dark pattern popups you get when you first open it. I haven't had such a horrible experience in a long, long time.
But are you sure you're not unsure that you don't not want to not make Edge not the undefault browser?
[Yes] [Negativen't] [Remind me in 3 days]
... * proceeds to remind u on next app launch unless you click [yes] *
You can try Ungoogled Chromium. It's an offshoot based on Chromium, just like Edge basing on Chromium, without the Google stuff.
No good browser.
its a conundrum. WebKit is a great engine, but nearly all good implementations are provided by Corps who's interests have very little to do with providing a good browser, and lots to do with what you do with that browser.
Firefox in turn might be one of the last major alternative Engines that is maintained by a company who's mission indeed is in a large parts to provide you with a good browser, but seems to progressively struggle to do so, while the engine is a good part of that problem aswell.
I find it harder and harder to deal with the many issues in daily usage -- and from a dev standpoint, FF is slowly surpassing Safari as the main blocker for being able to adopt new web frontend features.
I dearly hope Mozilla can get back on track. Accessing the open web shouldn't end up depending on a pick of Google, Microsoft or Apple.
*whose mission
thanks, just realised I mix those up quite frequently
There's the one with some bugs and the one that actively steps on your consent.
You could just have switched to using Ctrl-C instead.
I use Firefox every day and I don't think I have seen the problem. Well, I would never search Copy on a menu, Ctrl-C is so much easier.
I thought I'd stuffed up my system clipboard, or sites had found some way to obfuscate with JS or something. Very frustrating bug. I don't know if it's reassuring to me to find it's not user error in this case, given it hasn't been fixed.
I'm not surprised by "8 months" part. There were bugs not fixed for decades.
Which is not specific to Firefox. Nearly all software has those, including expensive commercial products.
And this bug will likely be fixed soon. 8 months for a bug that's hard to reproduce, and seems to involve some unexpected interactions between various browser components in a complex code base... yeah, that seems fairly reasonable.
It happened to me two or tree times on Wikipedia. When selecting text and right click, the copy item was disabled, I restarted Firefox and the copy field was enabled. Is funny how I never stopped to think about it till now seeing this post.
They seem to be working on it: https://bugzilla.mozilla.org/show_bug.cgi?id=1863246
Overall, Firefox is wonderfully fantastic these days.
I can see how this is frustrating to some, but sometimes that's how the priority nets out. It looks like the bug was triaged, investigated, took its time finding its way to the right developers, and now a fix will land soon.
This is mostly just the process working. I for one, am grateful for these folks' good work.
Yet this is a single example that actually was resolved, while far from the only inconsistencies and bugs.
While from an engine side, the situation with bugs lingering for years, and web features that still can't be used way, way after even Safari managed to implement them is not insignificant.
It's not broken or actually bad software, but it's struggling to keep up with the Browsers it's meant to be an independent alternative for.
This makes UX and feature parity a HUGE concern!
Loosing market share through inconveniencing users in turns means web devs will have increasingly less incentive to. work around it's quirks and issues, which even further shifts the Browser market towards a handful of huge, profit oriented companies - which is without exaggeration a threat to maintaining an open web.
Yeah, if this was some bug that had been languishing for years without anyone caring to look at it, I'd consider this a stain on Firefox's reputation. But that's not what's happening: it's a bug that manifests in what probably looks to the user like a simple way, but tracking down the problem and fixing it is not simple at all. People are working on it, and it looks like it'll be fixed in a public release before too long.
Agree: this is the process working.
Ah ok, I thought everyone was coordinating on breaking copy, not the browser itself!
Whoa I thought it was just me
Why are they ever? I thought it was a User Agent not a corp agent.
I can't believe so many people on HN use the right click copy menu.
Most websites I interact with use the mouse only (writing text aside) - navigation alone can always be done with just the mouse. So, it's often easier and faster to use the context menu if your other hand isn't already on the left side of the keyboard.