<?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>218507</bug_id>
          
          <creation_ts>2020-11-03 04:31:02 -0800</creation_ts>
          <short_desc>Up and down arrow keys in &lt;input&gt; have a different behavior when inside a shadow root</short_desc>
          <delta_ts>2020-11-07 20:41:20 -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>Forms</component>
          <version>Safari 14</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.15</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=172567</see_also>
          <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>
          
          <blocked>148695</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Cory LaViska">cory</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>cdumez</cc>
    
    <cc>darin</cc>
    
    <cc>rniwa</cc>
    
    <cc>smoley</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1703940</commentid>
    <comment_count>0</comment_count>
    <who name="Cory LaViska">cory</who>
    <bug_when>2020-11-03 04:31:02 -0800</bug_when>
    <thetext>When an &lt;input&gt; is present inside a shadow root, pressing the up/down arrows no longer moves the cursor to the start/end of the field. The following fiddle demonstrates a standard input with the correct behavior and an input within a shadow root with differing behavior.

Fiddle: https://jsfiddle.net/me9yatxz/1/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1704156</commentid>
    <comment_count>1</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-11-03 12:58:38 -0800</bug_when>
    <thetext>Does anyone know if this is a recent change or a long-standing issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1704489</commentid>
    <comment_count>2</comment_count>
    <who name="Smoley">smoley</who>
    <bug_when>2020-11-04 10:39:56 -0800</bug_when>
    <thetext>This also reproduces on Safari 13.1.2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1704490</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-11-04 10:40:17 -0800</bug_when>
    <thetext>&lt;rdar://problem/71042487&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1704695</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-11-04 18:21:54 -0800</bug_when>
    <thetext>Seems like this bug is in Safari, not WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1704705</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-11-04 18:42:11 -0800</bug_when>
    <thetext>Safari uses JavaScript to get metadata about the text field, and when it can’t because the field is in a shadow tree, its code misfires and blocks the up and down arrows. The misbehaving code is in Safari for handling autocompletion lists. The smaller fix is to make it just not screw up and confuse itself when the text field is in a shadow tree. The bigger fix would be to make autocompletion work with those fields too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1704900</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-11-05 09:28:59 -0800</bug_when>
    <thetext>The test case works as expected in MiniBrowser, and likely in other WebKit-based browsers.

There is a slim chance that some kind of change in WebKit could solve the problem, since it’s indirectly due to difficulty getting data about the text field from the Safari code.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>