Page MenuHomePhorge

Fix middle-click, CTRL+click, right-click etc. on Typehead search results
Closed, ResolvedPublic

Description

At the moment some native browser features are somehow broken on any Phorge/Phabricator search result ("Typehead"). Example broken actions:

  • middle-click
  • CTRL+click
  • right-click

Steps to reproduce:

  • search something in whatever "typehead" input field (for example use the Search bar at the top of your Phorge/Phabricator)
  • type something in the input field to find some results (example: type "pro" to get Projects etc.)

Now:

  • plug your mouse and use the middle-click on whatever search result
    • Expected behavior: the link opens in a new tab
    • What happens: the link does not open in a new tab
  • long-press the CTRL key (if you use macOS I mean the Action key) on whatever search result
    • Expected behavior: the link opens in a new tab
    • What happens: the link does not open in a new tab
  • do a right-click on an element
    • Expected behavior: you see the browser context menu: for example "Save Screenshot", "Inspect HTML" etc. like in any other element
    • What happens: the browser context menu does not open.

In short, most non-normal actions are just prevented/broken.

Why this is a bug:

Essentially, there is no reason to prohibit this behavior that is natively provided by any major browser and it's just essentially broken in Phabricator/Phorge. Fortunately we are not the only one in the world who break similar functionalities by mistake:

https://stackoverflow.com/q/29176928/3451846

Personally, the middle-click and the CTRL+click would be really useful to allow me to explore a search result without triggering its selection. So I can quickly inspect 10 search results and then select the right one. Think about exploring a Wikipedia article, where you can middle-click on whatever link to open it in a new tab, and you can also do that on the autocomplete search box. In short, I would like Phorge/Phabricator to support this. Also, the right-click would help me a lot in using the context menu, that, for example, has the possibility to take screenshots, copy the destination, or inspecting the HTML, just as you expect in any other part of the website.

Probably there is just an event listener that is too greedy.

A/B test about patch D25069:


Downstream discussions:

https://phabricator.wikimedia.org/T76812

Event Timeline

valerio.bozzolan renamed this task from Fix middle-click, CTRL+click etc. on Typehead search results to Fix middle-click, CTRL+click, right-click etc. on Typehead search results.Feb 26 2023, 21:58
valerio.bozzolan claimed this task.
valerio.bozzolan triaged this task as Low priority.
valerio.bozzolan updated the task description. (Show Details)