Hacker News new | ask | show | jobs
by dekatron 904 days ago
One of the things that I like about Firefox is that it lets you right click on websites that disable right clicking by holding down shift. Reminds you that the browser should be the user's agent and not the website's.
8 comments

This is great, but... As the meme goes, "why do we even have that lever" to disable a mouse click? More evidence that browsers are out of control, and have given over way too much agency to web developers. If a user doesn't want to right click on a page, they can just... not right click. Why does the developer even have a say?
> As the meme goes, "why do we even have that lever" to disable a mouse click?

So that web pages can implement their own behaviors for right-click, e.g. web applications which have their own contextual menus, games which use right click as an input, remote desktops which pass right click to the remote host, etc.

This.

We actually need the override right-click functionality in some cases. Most of the abused functionality had some normal use case at some point. It's a shame that bad actors make everyone's life harder.

It's about allowing a custom right click action more than just disabling it. There are plenty of use cases for making a custom action happen on right click. Google Docs adds a custom menu on right click. Games often have a use case for right clicking.
Usually it is done for one of three main reasons:

- to make it hard for the user to copy/save stuff

- to offer context menu in a web app

- in a web app game for whatever

The first reason is clearly hostile to the user. The rest is arguably reasonable.

Hijacking the right click is useful for web apps like word processors, text editors, spreadsheets, image editors.
This one's niche, but Firefox's dev tools also let web developers see which font is actually being used. Chrome's dev tools only show you what font is supposed to be in use, but doesn't tell you if it had to resort to a fallback font.
Are you sure? I think the computed tab in Chrome devtools shows the actual used font.
Yup if you scroll to the bottom of the Computed tab, it shows the "Rendered Fonts".
Ooh, that's a killer feature and this is the first I'm hearing about it! Thanks!
I wish you could stop websites hijacking the quick find key (/) too.
Or Ctrl+h for history. I'm looking at you Google Docs. I really don't understand why websites are allowed to override browser shortcuts and there is no way to block it.
Wow i didn’t know that. So much thanks.
The current meta for disabling right click seems to be invisible but tangible divs on top of the thing you don't want people to right-click.

... maybe they could add something like ctrl-shift-rightclick to get the context menu on the topmost visible element, and then we can get into more stupid arms races about opacity levels or something...

Convenience + simplicity > complexity
Did not know! Thatnks you!
It would be great if they allowed that for Ctrl+F as well. Jupyter Lab infuriates me with that.
(If I understand you correctly, a workaround is to switch focus to the address bar first so the ctrl-f goes to the browser chrome and not the page.)
(I'm not actually familiar with the issue but I imagine if they're "clever" enough to block CTRL+F, they probably also block CTRL+L which is supposed to change the focus to the URL bar. So in the end you have to resolve to using the mouse after all...)
I doubt they care that you’re switching to the address bar, my guess is that most people don’t know the above trick that switching to the browser chrome allows you to get around ctrl+f hijacking.
Yeah, it's a pain. One workaround is to go to the menu and select Find