<?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>156500</bug_id>
          
          <creation_ts>2016-04-12 03:30:23 -0700</creation_ts>
          <short_desc>Do not throw when getting selectionDirection/selectionStart/selectionEnd on input</short_desc>
          <delta_ts>2022-08-09 08:23:33 -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>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Simon Pieters (:zcorpan)">zcorpan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1183030</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2016-04-12 03:30:23 -0700</bug_when>
    <thetext>See https://github.com/whatwg/html/pull/1006

var input = document.createElement(&apos;input&apos;);
input.type = &apos;checkbox&apos;;
input.selectionDirection; // should return null
input.selectionStart; // should return null
input.selectionEnd; // should return null</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1183063</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-04-12 08:57:17 -0700</bug_when>
    <thetext>I am not against this change but I am slightly worried about backward compatibility here. I think I&apos;ll wait a bit before implementing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1183064</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-04-12 08:58:07 -0700</bug_when>
    <thetext>&lt;rdar://problem/25680941&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1213144</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-07-21 09:07:55 -0700</bug_when>
    <thetext>Chrome 52 and Firefox 47 still throw in this case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889854</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-08 16:59:52 -0700</bug_when>
    <thetext>I am not sure whether I am testing correctly here but when I copy the following snippet from Comment 0 into JSfiddle, I get following behavior across browsers:

Link - https://jsfiddle.net/sun1vzxq/show

*** Safari 15.6 on macOS 12.5 ***

Error in console - &quot;&lt;a class=&apos;gotoLine&apos; href=&apos;#43:6&apos;&gt;43:6&lt;/a&gt; TypeError: Type error&quot;

*** Firefox Nightly 105 ***

No error in console

*** Chrome Canary 106 ***

No error in console

______

Just wanted to share updated results. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889980</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2022-08-09 08:03:50 -0700</bug_when>
    <thetext>It seems this is fixed in Safari TP 148 (Safari 16.0, WebKit 17614.1.17.1)

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/10540

log: object &quot;null&quot; (0 props)
log: object &quot;null&quot; (0 props)
log: object &quot;null&quot; (0 props)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889982</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-09 08:23:33 -0700</bug_when>
    <thetext>Indeed, it is fixed in Safari Technical Preview 150. Thanks for bump simon@bocoup.com.. I am going to mark this as &quot;RESOLVED CONFIGURATION CHANGED&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>