[Webkit-unassigned] [Bug 257217] New: Removing positioned element from DOM with a focused input can jump to the bottom of the page
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 23 12:03:08 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=257217
Bug ID: 257217
Summary: Removing positioned element from DOM with a focused
input can jump to the bottom of the page
Product: WebKit
Version: Safari 16
Hardware: Mac (Apple Silicon)
OS: macOS 13
Status: NEW
Severity: Normal
Priority: P2
Component: DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jordan at cryptica.me
Created attachment 466466
--> https://bugs.webkit.org/attachment.cgi?id=466466&action=review
A file that showcases the bug
I checked this bug against Safari 16.5 *and* the latest Safari Tech Preview.
If you have an element which is either `position: absolute` or `position: fixed`;
That was just inserted into the DOM; AND
It contains a focused input element (either programmatic or because of `autofocus`); AND
A key event is wired up to remove the positioned element it can result in jumping to the bottom of the page.
The specifics surrounding this are quite weird but:
1. It requires that a user NOT interact with the input at all by focusing, typing text, or clicking.
2. It requires that there be an element with content below the viewport
3. And that element must be visible (`display: none` and `visibility: hidden` counteract the error)
4. That element must have a computed height that is at least `0.02px` (tested on my Mac Book Pro, 16-inch, 2021 with M1 Max)
The issue is definitely repeatable on the same page.
I've included a reproduction of this — with quite a bit more detail on different things I've tried and what I've seen that works and does not.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230523/96fa6cc2/attachment.htm>
More information about the webkit-unassigned
mailing list