Closed Bug 1785316 Opened 2 years ago Closed 2 years ago

Pressing Space on a <details> summary no longer inhibits scrolling

Categories

(Core :: DOM: Events, defect)

Firefox 105
defect

Tracking

()

RESOLVED DUPLICATE of bug 1726454

People

(Reporter: me, Unassigned)

Details

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

Steps to reproduce:

  1. Have a <details> element.
  2. Focus its summary.
  3. Press Space.

Sample URL: data:text/html,<a href>link</a><details open><div style=background:red;height:100vh></div></details><div style=background:lime;height:100vh><a href>link</a></div><div style=background:blue;height:100vh></div>

Actual results:

  1. The <details> element collapses or expands.
  2. The page scrolls down by a screenful.

Expected results:

The page should not have scrolled down.

In regular JS terms: the summary’s keydown handler that toggles details.open should have called event.preventDefault().

This is a regression in I think the last year, maybe somewhere around January at a guess. I’ve been meaning to file this bug for ages. I haven’t tried bisecting.

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

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

Seems more like an event-handling regression in DOM than WebRender. Re-directing for evaluation.

Component: Graphics: WebRender → DOM: Events

I can reproduce it from the build of 2020-11-01. I needinfo'd myself to take further looking.

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