Feature summary:
It should be possible to have a Lookup where the individual MenuItems have a url set, but (primary) clicking the items does not change the browser’s location. (Middle-clicking the items, or right-click + “open in new tab”, should still be supported.)
Use case(s):
In the Wikidata Image Positions tool, I am using a Codex Lookup to implement a Wikidata item selector. It would be very useful if users could open the search results in a new tab, to confirm that they are selecting the right item. (For example, there are plenty of lesbian pride flag items; the descriptions try to disambiguate them, but being able to open them in a new tab and look at their images is also helpful.)
Currently, I can set a url on the search results, but then “normal” clicking on a result will navigate to that item, instead of selecting it and staying on the page. The “click follows link” behavior is fine when the Menu is used for a search, like in Vector (TypeaheadSearch), but less so in a Lookup, in my opinion.
Benefits:
Without this, Codex is less viable for entity selectors; in particular, a feature like this would be needed for parity with the current WikibaseMediaInfo implementation (see T224604: Allow to middle-click through to the Wikidata item from search results when adding Depicts statements, though the implementation was later amended by T237048).