Open Bug 1597769 Opened 5 years ago Updated 2 years ago

scroll-margin is not respected when typing into an offscreen textarea

Categories

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

70 Branch
defect

Tracking

()

People

(Reporter: sammy, Unassigned)

Details

Attachments

(1 file)

Attached file bug-test.html

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

Steps to reproduce:

  1. Open the attached file (bug-test.html)
  2. Scroll to the bottom of the page
  3. Click the scrollIntoView() button, note that the fixed div is not obscuring the textarea
  4. Click on the textarea to focus it
  5. Scroll to the bottom of the page so that the textarea is offscreen
  6. Type any text to autoscroll the viewport

Actual results:

After hitting the scrollIntoView button, the viewport scrolled up far enough that the fixed div did not obscure the textarea. After typing into the textarea, the viewport did not auto-scroll far enough, and the fixed div covered up the typing area.

Expected results:

The viewport should have auto-scrolled far enough that there was (scroll-margin-top) worth of space above the typing area.

Component: Untriaged → Layout
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Component: Layout → Layout: Scrolling and Overflow
Ever confirmed: true

Seems like bug 1534070 landed with (the equivalent to) this line.

Hiro, seems there are a bunch of callers that use that flag. Is there really any case where we want not to honor scroll-margin and scroll-padding?

I think we should ~always honor them.

Flags: needinfo?(hikezoe.birchill)

Basically what I did for scroll-{margin,padding} was to ignore them for internal usages (i.e. not web-exposed features). But yeah in this case we should honor them. And it is/was not clear to me whether all the places should honor them or not. So to me, a way I can think of is bug-report-driven just like this bug. And IIRC, Masayuki gave me a comment that he is reluctant to honor them in all places blindly (and I agreed with him).

Flags: needinfo?(hikezoe.birchill)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: