<?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>210875</bug_id>
          
          <creation_ts>2020-04-22 14:13:30 -0700</creation_ts>
          <short_desc>Caret does not paint correctly in vertical SVG text</short_desc>
          <delta_ts>2022-07-11 14:48:20 -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>SVG</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=210877</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=210885</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Bates">dbates</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>megan_gardner</cc>
    
    <cc>rniwa</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1644495</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2020-04-22 14:13:30 -0700</bug_when>
    <thetext>Consider the .svg page with the following markup:
[[
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
&lt;g writing-mode=&quot;vertical-lr&quot;&gt;
    &lt;text id=&quot;text&quot; font-size=&quot;50&quot; x=&quot;50&quot; y=&quot;50&quot; style=&quot;-webkit-user-modify: read-write&quot; tabindex=&quot;0&quot;&gt;Hello&lt;/text&gt;
&lt;/g&gt;
&lt;script&gt;
window.getSelection().setBaseAndExtent(document.getElementById(&apos;text&apos;).firstChild, 0, document.getElementById(&apos;text&apos;).firstChild, 0);
&lt;/script&gt;
&lt;/svg&gt;
]]

Open the page. You should see a horizontal caret before the &apos;h&apos;. On iOS I see a vertical caret to the left of the &apos;h&apos; and on Mac I see a horizontal caret only on first load between &apos;l&apos; and &apos;l&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1644505</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-04-22 14:47:31 -0700</bug_when>
    <thetext>&lt;rdar://problem/62212006&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1881960</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-10 11:48:16 -0700</bug_when>
    <thetext>I am able to reproduce this bug in Safari 15.5 on macOS 12.4 and Safari Technical Preview 148 (based on described of caret showing up on first load between &quot;l&quot; vertically.

I also changed the test case into following JSFiddle - https://jsfiddle.net/gcmr2s1p/show

On other browsers, Chrome Canary 105 does not show caret upon selection and just show selection border (also no weird horizontal block like Safari to shape like &quot;L&quot; of Tetris game) while Firefox Nightly 104 does not show selection border unless if I select all text. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>