Closed Bug 1549582 Opened 6 years ago Closed 6 years ago

The HTMLElement.focus({preventScroll: true} is still scrolling the window.

Categories

(Core :: DOM: Core & HTML, defect)

66 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox68 --- unaffected

People

(Reporter: andro.marian.v94, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

Clicked the button on: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#frame_Focus_prevent_scroll

Actual results:

When pressing the "Click me to focus on the button without scrolling!" button.
The scroll bar still changed to the focused button.

Expected results:

To not scroll ...

The compatibility table lists this as not available in the current release of Firefox (66.x). I can confirm it is working in Nightly (68). Can you confirm if it works in nightly for you?

Component: Untriaged → DOM: Core & HTML
Flags: needinfo?(andro.marian.v94)
Product: Firefox → Core

Yes. Works in Nightly.

Flags: needinfo?(andro.marian.v94)

Thanks. I will mark as WORKSFORME.

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