Closed Bug 1737452 Opened 3 years ago Closed 3 years ago

When moving cursor onto blank lines in tall textareas, visual cursor doesn't move until it blinks

Categories

(Core :: Graphics: WebRender, defect)

Firefox 93
defect

Tracking

()

RESOLVED DUPLICATE of bug 1731165

People

(Reporter: nyanpasu64, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

  • Open the attached file. The attachment has a very long textarea with a scrollbar, but the bug occurs whether you keep the text or remove most of it.
  • Click in the textarea, on or next to a blank line.
  • When the cursor is visible, use the arrow keys to move it onto a blank line.

Alternatively hold the down arrow key to move the cursor quickly across non-blank and blank lines.

Actual results:

If you move the cursor onto a blank line while it's in the visible phase of the flash cycle, it will sometimes fail to change position immediately. Instead arrow keypresses update the internal position, but fail to redraw the visual cursor. If you don't type a character, the cursor will disappear on a timer and later redraw properly at the new position. When the cursor is invisible, an arrow keypress will immediately make it appear at the correct position.

Typing a character at any point redraws it properly.

If you're unable to make the cursor fail to redraw, try clicking on an empty line or pressing Ctrl+Home, then holding arrow-down. This should make the bug appear.

Additionally, clicking any line (empty or non-empty) with the mouse will (sometimes) fail to reset the blink timer unless the cursor is currently invisible. On Linux, the cursor flashes 1 second on and 1 second off. So if you wait 0.9 seconds after the cursor appears and click in a text field, the cursor will disappear after 0.1 seconds and remain invisible for 1 second. This is a confusing user experience IMO.

(The exact behavior of the cursor flashing is somewhat inconsistent, and my observations may be incomplete or not 100% accurate.)


The textarea has a style=height:Npx tag making the textarea thousands of pixels tall. This tag (or manually making the textarea very tall) is necessary to trigger the bug. The width of the textarea (or the presence/absence of a textarea scrollbar) doesn't affect whether the bug triggers or not.

I'm on a 2560x1440 display, with Firefox taking up the left half of the screen. On 125% DPI scaling, I only get the bug when the textarea is height:2043px or greater. On 100% DPI scaling, I only get the bug when the height is 2557px or greater. So I think it's the size of the textarea in physical pixels that matters.

Making the Firefox window vertically shorter causes the bug to trigger at smaller textarea heights, but this is a stepped/quantized rather than a linear relationship. Making the window horizontally wider doesn't change the minimum window height for a given textarea height.

At 96dpi, for all textarea heights from ~1535px to ~1785px, the bug is triggered by decreasing window.innerHeight below 565 or so. For all textarea heights from ~1790px to 2044px, the bug is triggered by decreasing window.innerHeight below 680 or so. For all textarea heights from 2045px to ???, the bug is triggered by decreasing window.innerHeight below 796 or so. (I think a stepped relationship also holds if you treat window.innerHeight as the independent variable, but the exact formula is too complicated for me to figure out without getting confused.)

Expected results:

Upon any arrow keypress or mouse click, the cursor is reset to the visible state and redrawn at the new position, and the blink timer is reset to the beginning of the visible phase.

The bug occurs on Arch Linux, Firefox 93.0, both WebRender and WebRender (Software). (I think Firefox has removed non-WebRender backends?)

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Severity: -- → S4
Flags: needinfo?(jmathies) → needinfo?(tnikkel)

There doesn't appear to be an attached file. Could you upload a testcase or provide a url for one? Thanks.

Flags: needinfo?(nyanpasu64)

Sorry for forgetting to attach the test page, here it is.

For a simpler test, visit https://write.as/new and hold the Enter key, and watch the cursor not update on every line. After a few seconds holding Enter, release Enter and hold the Up or Down arrows, which will also fail to redraw.

Flags: needinfo?(nyanpasu64)

I think this is bug 1731165 which should be fixed in beta / nightly.

Thanks Emilio!

yanpasu64, if you could check beta or nightly to see if the problem is fixed for you that would be great.

Flags: needinfo?(tnikkel)

The issue seems fixed I think. Thanks!

Thanks!

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: