WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
226739
iFramed position:fixed element doesn't show in viewport after page regains focus
https://bugs.webkit.org/show_bug.cgi?id=226739
Summary
iFramed position:fixed element doesn't show in viewport after page regains focus
Karen
Reported
2021-06-07 13:55:16 PDT
When an iFramed document contains a position:fixed element inside the scrollable body. The position fixed element moves along with the viewport fine when the page loads and has focus. But, tab away to another tab, then back to the page, and, in Safari, the position:fixed element is hidden at the top of the page. Not at the scrolled position. It's as if the container box is not the viewport anymore but the body. However, in Safari inspector, the position:fixed element is registering as existing in the viewport area. The position:fixed element's bounding box is in the fixed:position where the element should be visible. But, the position:fixed element is not visible there, its hidden at the top. The element only snaps into the viewport when the body is manually scrolled. Attempting to scroll the body with javascript does not show the position:fixed item in the viewport. This is only an issue in Safari. Firefox and Chrome show the item in its fixed position fine, with no problems, after the page gets focus again. Example:
https://jsfiddle.net/khdolan/o1md489z
In Safari, tab to another page and back to the rendered fiddle to see the issue.
Attachments
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2021-06-07 14:04:33 PDT
Thanks for the report.
Radar WebKit Bug Importer
Comment 2
2021-06-07 14:04:46 PDT
<
rdar://problem/78962618
>
Karen
Comment 3
2021-06-15 07:04:57 PDT
Possible related to the new Shadow DOM/Tree changes in Safari? However, this issue only happens when the iFramed page regains focus in Safari.
Ahmad Saleem
Comment 4
2026-02-21 10:18:12 PST
I am not able to reproduce this on Safari 26.4 Beta - is it still reproducing for anyone? @Karl - any luck?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug