Page MenuHomePhabricator

Allow selection of the page title in Visual Editor
Closed, ResolvedPublic

Description

An experienced Wikipedian gave me a list of reasons why he doesn't use the VE much. Number 2 was the inability to select the page title while using VE.

This has bothered me, too. I kind of got used to it, but I really don't like it. As far as I can see, this was done as part of T116755, but I really don't understand what is it good for.

Removing the user-select CSS rules will probably resolve this issue, and I don't see any problems that it will add.

Event Timeline

Change 490116 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Allow page title heading to be selected while editor is active

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

Seems fine. Read-only != unselectable.

Change 490116 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Allow page title heading to be selected while editor is active

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

We should also add cursor:text to indicator the text is selectable, however this also requires user-select to be re-enabled too. @matmarex In your comment you talk about section-0 edit links as content tested in <h1>, where do those appear? Could we add a selector like h1 > a to re-disable those?

We should also add cursor:text to indicator the text is selectable, however this also requires user-select to be re-enabled too.

(I think you mean pointer-events)

@matmarex In your comment you talk about section-0 edit links as content tested in <h1>, where do those appear? Could we add a selector like h1 > a to re-disable those?

There's a popular gadget that adds them:

(Feel free to submit a patch if you want to work that out, I'm not fixing it right now, but I'll look at some point if it stays unfixed)

Looks like those gadget links get erased by VE anyway, as we manually set the firstHeading.

Change 499850 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Fix cursor on #firstHeading

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

Change 499850 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Fix cursor on #firstHeading

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

matmarex removed a project: Patch-For-Review.

(The main patch already went through QA)

Looks like those gadget links get erased by VE anyway, as we manually set the firstHeading.

That's not true, at least not generally. My script https://de.wikipedia.org/wiki/Benutzer:Schnark/js/section-links.js adds some icons to the heading, and these are still there when I edit in VE (they are not visible, because my script is sensible enough to hide them when not applicable). So the CSS rule targeting these gadget-generated links is really necessary.

@matmarex, 2 questions...

A) Are these appropriate actions to take to test whether this patch is working as it's been intended to?

  1. On desktop, navigate to https://deployment.wikimedia.beta.wmflabs.org/wiki/Nova1
  2. Tap Edit
  3. VE opens
  4. Move mouse to page title (<h1 id="firstHeading...)
  5. Click mouse
  6. Drag cursor across page title
  7. Text is selected

B) Does this video, show the patch behaving in the way it's been intended to?


Fwiw: cursor:text and user-select both seem to be enabled:

T214790-inspect.png (1×2 px, 759 KB)

Yes and yes, that looks correct to me.

Ok, great - thank you for confirming 😅