Hacker News new | ask | show | jobs
by ryandrake 907 days ago
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?
4 comments

> 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.