<?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>202120</bug_id>
          
          <creation_ts>2019-09-23 15:49:05 -0700</creation_ts>
          <short_desc>CSS position: sticky does not pin element to bottom of screen when virtual keyboard is open</short_desc>
          <delta_ts>2024-08-30 17:09:14 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>Safari 12</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 12</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></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>william</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>709922234</cc>
    
    <cc>bfulgham</cc>
    
    <cc>david</cc>
    
    <cc>dbates</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1573448</commentid>
    <comment_count>0</comment_count>
    <who name="">william</who>
    <bug_when>2019-09-23 15:49:05 -0700</bug_when>
    <thetext>CSS position: sticky/-webkit-sticky does not pin element to bottom of screen when virtual keyboard is open.


Steps to reproduce:
1. Open https://codepen.io/wmsmacdonald/pen/vYBVVRL in Safari on iOS
2. Scroll to bring white screen into viewport
3. Click text input to focus


Expected:
Red footer should stick to bottom of screen even when virtual keyboard is open
Actual:
User must scroll down with keyboard open in order to see the red footer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574706</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-09-26 19:53:57 -0700</bug_when>
    <thetext>&lt;rdar://problem/55768460&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1576148</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-10-02 13:36:06 -0700</bug_when>
    <thetext>Sticky position elements use the layout viewport (not the visual viewport) for positioning, and when the keyboard is up, the layout viewport extends below the keyboard. So this behavior is expected. position:fixed elements have the same behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1576560</commentid>
    <comment_count>3</comment_count>
    <who name="">william</who>
    <bug_when>2019-10-03 13:07:41 -0700</bug_when>
    <thetext>I confirmed that position: sticky uses the visual viewport for non-Safari Webkit browsers:
Chrome
Firefox
Opera
Samsung Internet


Based on this, I would expect the onus to fall on the Safari team to show that they have the correct interpretation of the the CSS spec.

I wasn&apos;t able to find to find anything specific regarding layout vs visual viewport in the spec: https://www.w3.org/TR/css-position-3/#sticky-pos

But maybe you have reference that is guiding your interpretation.


I made a StackOverflow question to give this some visibility:
https://stackoverflow.com/questions/58226087/position-sticky-doesnt-work-when-virtual-keyboard-is-open-in-safari/58226155#58226155</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1576581</commentid>
    <comment_count>4</comment_count>
    <who name="">william</who>
    <bug_when>2019-10-03 13:48:14 -0700</bug_when>
    <thetext>By the way, thank you for supporting this software.

One more thing: is there a workaround for fixing an element to the visual viewport that has good Safari support?

The Visual Viewport API gives you enough information to calculate this https://developer.mozilla.org/en-US/docs/Web/API/Visual_Viewport_API
but it only is supported by Safari 13.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>