Page MenuHomePhabricator

Strange behavior when moving cursor across links
Open, Needs TriagePublic

Description

Use VisualEditor to create a new line of the form
xxx FAQ yyy
and turn the text "FAQ" into a link to the article FAQ. Now place the cursor at the first x, then keep hitting the <cursor-right> key to move all the way to the y's, then keep hitting the <cursor-left> key to move back to the x's. Do this a couple of times. The expected behavior is that the cursor stops once before the F to highlight the link text light blue, and that it stops again once after the Q to remove that highlighting.

However, you will notice that the cursor often (but not always!) stops two or more times before the F and/or after the Q. This is definitely a race condition: the faster you hit the cursor keys, the more likely the aberrant behavior will occur; if you space your cursor keys .5 seconds apart, the expected behavior occurs almost every time.

This is on Firefox 58/Linux, using VisualEditor 0.1.0 (140ec5f).

Event Timeline

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

I could not repeat the described aberrant behavior on Chromium 63/Linux.

This reminds me a bit of T169353: Can't use the arrow keys to select back-to-back refs in Firefox, where sometimes extra cursor moves are necessary without reason.