Page MenuHomePhabricator

Allow selection of the text in the Visual Editor reference inspector
Closed, ResolvedPublic

Description

When you click on a footnote number, a selector with the citation text appears.

It's often useful to select this text and copy it to the clipboard. It's impossible, however.

My guess is that it happens because user-select: none is inherited from a OOUI widget. This may be useful in some cases, but I see no reason whatsoever to make it impossible to select the reference text.

Somewhat similar: T214790: Allow selection of the page title in Visual Editor

Event Timeline

Until T208826 is done, this would have some side-effects, as removing the selection from within the text would immediately close the context popup. Once that ticket is done and the patches merged, it'd probably be doable.

Though... the context popup does contain the formatted version of the text, in a way which is less copy-friendly than the editable form you get after you click "edit". Most notably: if your citation contains an invisible template or a comment, that wouldn't be caught by copying the context popup.

So, trade-offs do exist.

Note that T208826 doesn't turn this on for all editor modes, specifically just single article editing (but not Flow or CX). For those cases where we null selections we'd need to special case cursor-in-inspector as triggering a deactivate, not null.

I was also worried about the selection not activating again when you move the cursor away from the document, but this is an existing issue: T220439

Change 502317 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Make context's contents selectable

https://gerrit.wikimedia.org/r/502317

Change 502317 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Make context's contents selectable

https://gerrit.wikimedia.org/r/502317

Change 504075 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (33847a3ec)

https://gerrit.wikimedia.org/r/504075

Change 504075 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (33847a3ec)

https://gerrit.wikimedia.org/r/504075