5 ms·
I'm aware of 5 operations that a standard link should support: - Left-click (obvious) - Right-click (context menu) - Middle-click (open in new tab) - Ctrl-c
by p1mrx 3y ago
I'm aware of 5 operations that a standard link should support:
- Left-click (obvious)
- Right-click (context menu)
- Middle-click (open in new tab)
- Ctrl-click (open in new tab)
- Shift-click (open in new window)
Most sites support at least one of right/middle/ctrl-click, though sometimes you have to Duplicate the tab and then left-click. If none work, and duplicating the tab loses context, it's probably time to abandon hope and find another website.
- eyelidlessness 3y agoNote: if at all possible, don’t implement these yourself! You’ll very probably do it wrong for at least some users. For example, ctrl-click for new tab is platform specific: on macOS it should be cmd-click, and ctrl-click should open a context menu. Most if not all are or can be user-configurable, which might not be detected by JS. But the default behaviors will do the right thing unless you override them.
- p1mrx 3y agoI'm the parent commenter and I approve this message.
- jezzamon 3y agoThere's a set of events for mobile too, e.g. long-press should pop up menu
- Y-bar 3y agoClick-hold-drag is another one I use occasionally. For example to: * Save the link as a .loc file on the desktop * Open the link in a tab in another browser window, or another browser altogether. * Add it to a terminal prompt (e.g. curl/wget) (try it with some links on this site into the text box or your text editor of choice)