Closed Bug 1787969 Opened 2 years ago Closed 2 years ago

Scroll position of textarea is lost if "overflow" style is modified

Categories

(Core :: Layout: Scrolling and Overflow, defect)

Firefox 103
defect

Tracking

()

RESOLVED DUPLICATE of bug 1787088

People

(Reporter: dl1644, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Steps to reproduce:

  1. Navigate to https://codepen.io/dl1644/pen/vYRoONK
  2. Click into the textarea and move your cursor to the end of "scroll position"
  3. Hit Enter/Return a bunch of times in the text area until the text area stops growing in height.
  4. Note that the text cursor is no longer in view.

Actual results:

Setting a textarea's "overflow" style to "hidden" seems to reset the textarea's scroll position.

Expected results:

The textarea's scroll position should be maintained. https://bugzilla.mozilla.org/show_bug.cgi?id=1787062 might be tangentially related, but I'm pretty sure that I saw this before Firefox 104. Note that the above codepen displays the expected results in Chrome and Safari

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Scrolling and Overflow' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout: Scrolling and Overflow
Product: Firefox → Core

I can't repro anymore after bug 1787088, can you confirm on a build from https://nightly.mozilla.org?

Flags: needinfo?(dl1644)

Tested via Nightly Firefox, verified that I can no longer reproduce as well, thanks!

Flags: needinfo?(dl1644)
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.