Page MenuHomePhabricator

VisualEditor: The "Add a link" drop-down box should not automatically select the option that your mouse is hovering over
Open, Needs TriagePublic


Description of problem:

  • If your cursor happens to be located over an item in VisualEditor's "Add a link" drop-down box, VisualEditor selects that item when you click Enter instead of selecting the text you've higlighted.

Expected behaviour:

  • The text you've highlighted should be chosen as the link target unless you click on any other item or move your mouse to it. A cursor happening to be located somewhere and me not moving it is not an indicator that I want to select something.


In the following screengrab, I selected the text "Communications", hit Command+K to add a link to it, and then I hit enter. The popup box made my page move around, causing my cursor (which was originally placed over the highlighted text) to be placed over a list item named "Communications satellite".
This is unexpected behaviour and this very often causes me to select links I'm not interested in.
Compare this to regular HTML drop-downs: If I use keyboard inputs to open a drop-down, the placement of my cursor does not affect the selection unless I move the cursor.

Suggested solution, either:

  1. Require a mouse-move event to select another drop-down item. Don't just get where the mouse happens to be.
  2. Require a click to select a list item.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

We've fixed a similar issue in the past: T125740. It should be possible to add a similar workaround here (although it might be a bit more tricky, since the scrolling is triggered in a different place).