Page MenuHomePhabricator

Clicking to the left of a line moves the cursor few lines above in some cases
Closed, DeclinedPublic


Steps to replicate:

  1. Go to this page:
  2. Click on the left side of the paragraph below the codeblock.
  3. At this point, the fake slug above the codeblock will get activated.
  4. Now click on say, bullet list to add a bullet point or press return, the bullet point or the line break will get added in the position of the slug.

It is more confusing since the page does not scroll up to that position or show the cursor, so it is quite unnoticeable for a user that bullet list/line break is getting added to some other line.

I noticed it happening for several other block nodes such as musical notation/math formula etc.

Event Timeline

Deskana edited projects, added VisualEditor (Current work); removed VisualEditor.

You can actually end up editing the "Insert paragraph" text by backspacing into it...

Screen Shot 2018-07-31 at 19.50.10.png (740×1 px, 92 KB)

You can actually end up editing the "Insert paragraph" text by backspacing into it...

This made me wonder why slugs are contenteditable. Apparently, making them non-contenteditable breaks Firefox: T139428#2541199 (or at least it did 2 years ago).

This is reproducible with any focusable block node, e.g. on this minimal document:


Clicking twice to the left of the node puts the cursor into the slug text and lets you edit it

And the problem happens because Chromium natively puts the cursor into the slug even though the click is outside the slug, but not in Firefox because its native behaviour is different (it puts the cursor directly into the surrounding div).

Ok, I created T201599 for the separate slug cursoring issue, which is really a corruption problem as @Deskana suggests.

Given this is cause by native browser behaviour and is not a regression, I don't think we should prioritise it. I imagine most people don't even know you can click in the left gutter...

T201599 seems more obvious and fixable though.

Declining per the above.