Closed
Bug 1774639
Opened 4 years ago
Closed 4 years ago
HTMLInputElement.focus({ preventScroll: true }); still scrolls to centre the input
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1544660
People
(Reporter: kbrosnan, Unassigned)
References
Details
From github: https://github.com/mozilla-mobile/fenix/issues/25606.
Steps to reproduce
- Referring to https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
- Use the source provided in the 'Focus with option' section
- Works as expected, specifically, the button is not scrolled into view with the "button without scrolling"
- Use an <input> element instead of <button> element and repeat
- The "Click me to focus on the button without scrolling!" still scrolls down and focuses on the input.
- Works fine on desktop Firefox and on the DevTools emulator
- Sample HTML page to illustrate attached as a .txt file
test.txt
.Expected behaviour
The <input> element should not be scrolled into view
Actual behaviour
The <input> element is still scrolled to and positioned in the centre of the viewport.
Device name
Samsung Galaxy S9+
Android version
Android 10
Firefox release type
Firefox
Firefox version
101.2.0 (Build #2015885215)
Device logs
No response
Additional information
No response
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Comment 1•4 years ago
|
||
Moving to APZ component
This is an old Android bug, but would be nice to fix.
status-firefox101:
--- → affected
status-firefox102:
--- → affected
status-firefox103:
--- → affected
Component: General → Panning and Zooming
Product: GeckoView → Core
Summary: [Bug]: In Javascript, HTMLInputElement.focus({ preventScroll: true }); still scrolls to centre the input → HTMLInputElement.focus({ preventScroll: true }); still scrolls to centre the input
Updated•4 years ago
|
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•