<?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>119711</bug_id>
          
          <creation_ts>2013-08-12 18:03:48 -0700</creation_ts>
          <short_desc>Make CSS property user-select:none not to affect Document.caretRangeFromPoint()</short_desc>
          <delta_ts>2023-05-19 10:18:50 -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>HTML Editing</component>
          <version>528+ (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>BlinkMergeCandidate</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>208677</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>clopez</cc>
    
    <cc>enrica</cc>
    
    <cc>eoconnor</cc>
    
    <cc>oleary.gabe</cc>
    
    <cc>syoichi</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>916472</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-08-12 18:03:48 -0700</bug_when>
    <thetext>Consider merging https://chromium.googlesource.com/chromium/blink/+/50bbb9f6ab3394327e8fa63312316e6ae217a7a2

This patch introduces PositionWithAffinity as return value of RenderObject::positionForPoint() for making CSS property user-select:none doesn&apos;t affect Document.caretRangeFromPoint() and changes caretRangeFromPoint() to use Position instead of VisiblePosition, which excludes user-select:none.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>916769</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-08-13 09:58:24 -0700</bug_when>
    <thetext>I wonder if user-select:none breaks OS X Dictionary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1832568</commentid>
    <comment_count>2</comment_count>
    <who name="">oleary.gabe</who>
    <bug_when>2022-01-20 14:02:09 -0800</bug_when>
    <thetext>8+ years later and this bug is still present which makes certain functionality difficult if not impossible to replicate in iOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1892799</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-21 09:58:48 -0700</bug_when>
    <thetext>I changed the test case from patch to JSFiddle:

Link - https://jsfiddle.net/4p7rexLf/

*** Safari 15.6.1 on macOS 12.5.1 / STP 151 ***

FAIL range.startContainer should be [object Text]. Was [object Text].
FAIL range.startOffset should be 2. Was 0.
PASS range.collapsed is true
PASS successfullyParsed is true

*** Firefox Nightly 105 ***

FAIL successfullyParsed should be true (of type boolean). Was undefined (of type undefined).

*** Chrome Canary 106 ***

PASS range.startContainer is $(&quot;sample&quot;).firstChild
PASS range.startOffset is 2
PASS range.collapsed is true
PASS successfullyParsed is true

______________

Just wanted to share updated test results. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929297</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-01-29 14:17:27 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #3)
&gt; I changed the test case from patch to JSFiddle:
&gt; 
&gt; Link - https://jsfiddle.net/4p7rexLf/
&gt; 
&gt; *** Safari 15.6.1 on macOS 12.5.1 / STP 151 ***
&gt; 
&gt; FAIL range.startContainer should be [object Text]. Was [object Text].
&gt; FAIL range.startOffset should be 2. Was 0.
&gt; PASS range.collapsed is true
&gt; PASS successfullyParsed is true
&gt; 
&gt; *** Firefox Nightly 105 ***
&gt; 
&gt; FAIL successfullyParsed should be true (of type boolean). Was undefined (of
&gt; type undefined).
&gt; 
&gt; *** Chrome Canary 106 ***
&gt; 
&gt; PASS range.startContainer is $(&quot;sample&quot;).firstChild
&gt; PASS range.startOffset is 2
&gt; PASS range.collapsed is true
&gt; PASS successfullyParsed is true
&gt; 
&gt; ______________
&gt; 
&gt; Just wanted to share updated test results. Thanks!

I get:

PASS range.startContainer is $(&quot;sample&quot;).firstChild
PASS range.startOffset is 2
PASS range.collapsed is true
PASS successfullyParsed is true

TEST COMPLETE
Before Test After

In Safari Technology Preview 162 - I think we can mark this as &quot;RESOLVED CONFIGURATION CHANGED&quot; now. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1956526</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-05-19 10:18:50 -0700</bug_when>
    <thetext>Working as expected in Safari 16.5 (might as well be in Safari 16.4).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>