Cursor behaves weirdly in the composer - it disappears as I move it up/down

As you move cursor up/down by pressing on the up/down arrows, the cursor sometimes disappears for half a second and makes you wonder - where is the cursor? Have I moved it up/down enough? Am I on the right line?

The cursor does not actually disappear per se - it continues to blink with the correct interval. But the way it is currently implemented is not the way it is implemented everywhere else - in text editors, in the browser inputs, in IDEs, etc.


Here’s the cursor in Discourse:

Note how I easily manage to quickly press up or down two times and make the cursor invisible while on an empty line. This makes me feel as the cursor disappears and I lose it from sight, and therefore cannot control it precisely.

Compare it to how the cursor works in JSFiddle, as an example:

Note: it doesn’t matter how fast I press on the up/down button, the cursor is always visible as it moves from one line to another. In other words, the blinking “resets” as the cursor moves to another line.

Hope the two videos explain the issue clearly and make it an easy consideration to fix the issue.

Yeah, Firefox bug.

Seen it on Linux, have not noticed it on Windows though.


See: 226301 - Cursor disappears sporadically

But wait, my second video is recorded in Firefox too, and there is no such a problem. Also, I know the reproduction steps exactly, it does not disappear “sporadically” as in the report you linked to. Is this because jsfiddle uses their own rendering mechanism of the cursor while Discourse uses the default textarea and thus is affected by the default cursor Firefox behaviour?

JSFiddle is not using a TEXTAREA it is using a contenteditable HTML element, TEXTAREA does not support all that highlighting.

Recommend you post on that Firefox bug I linked, looks exactly like what you are seeing.

1 Like