<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>226739</bug_id>
          
          <creation_ts>2021-06-07 13:55:16 -0700</creation_ts>
          <short_desc>iFramed position:fixed element doesn&apos;t show in viewport after page regains focus</short_desc>
          <delta_ts>2026-02-23 18:33:08 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Compositing</component>
          <version>Safari 14</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 10.15</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karen">kdolan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>karlcow</cc>
    
    <cc>kdolan</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1767539</commentid>
    <comment_count>0</comment_count>
    <who name="Karen">kdolan</who>
    <bug_when>2021-06-07 13:55:16 -0700</bug_when>
    <thetext>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&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767541</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2021-06-07 14:04:33 -0700</bug_when>
    <thetext>Thanks for the report.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767542</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-06-07 14:04:46 -0700</bug_when>
    <thetext>&lt;rdar://problem/78962618&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1769783</commentid>
    <comment_count>3</comment_count>
    <who name="Karen">kdolan</who>
    <bug_when>2021-06-15 07:04:57 -0700</bug_when>
    <thetext>Possible related to the new Shadow DOM/Tree changes in Safari? However, this issue only happens when the iFramed page regains focus in Safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2183762</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-02-21 10:18:12 -0800</bug_when>
    <thetext>I am not able to reproduce this on Safari 26.4 Beta - is it still reproducing for anyone?

@Karl - any luck?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2184268</commentid>
    <comment_count>5</comment_count>
      <attachid>478451</attachid>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-02-23 18:32:58 -0800</bug_when>
    <thetext>Created attachment 478451
testcase

It doesn&apos;t reproduce for me on macOS 15.7.3 with Safari Technology Preview 237, Chrome and Firefox latest versions.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>478451</attachid>
            <date>2026-02-23 18:32:58 -0800</date>
            <delta_ts>2026-02-23 18:32:58 -0800</delta_ts>
            <desc>testcase</desc>
            <filename>testcase.html</filename>
            <type>text/html</type>
            <size>1044</size>
            <attacher name="Karl Dubost">karlcow</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CiAgICA8bWV0YSBjaGFyc2V0
PSJVVEYtOCI+CiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNl
LXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCI+CiAgICA8dGl0bGU+QldPIDIyNjczOTwvdGl0bGU+
CiAgICA8c3R5bGU+CgojbXktbW9kYWwtY29udGFpbmVyIHsKICBtaW4taGVpZ2h0OiAyNDAwcHg7
CiAgYmFja2dyb3VuZC1pbWFnZTogbGluZWFyLWdyYWRpZW50KHJlZCAsIHllbGxvdyk7Cn0KCiNt
eS1tb2RhbCB7CiAgcG9zaXRpb246IGZpeGVkOwogIGJvdHRvbTogMTNweDsKICBiYWNrZ3JvdW5k
LWNvbG9yOiBibHVlOwogIGhlaWdodDogMTAwcHg7CiAgb3ZlcmZsb3c6IGF1dG87Cn0KCgogICAg
PC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KPGRpdiBpZD0ibXktbW9kYWwtY29udGFpbmVyIj4KIDxk
aXYgaWQ9Im15LW1vZGFsIj4KICAgVGhlIHBhcmFncmFwaCBpbiB0aGUgbW9kYWwgZGl2OgogICA8
cD4KICAgTG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2Npbmcg
ZWxpdCwgc2VkIGRvIGVpdXNtb2QgdGVtcG9yIGluY2lkaWR1bnQgdXQgbGFib3JlIGV0IGRvbG9y
ZSBtYWduYSBhbGlxdWEuIFV0IGVuaW0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