<?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>286961</bug_id>
          
          <creation_ts>2025-02-03 14:45:32 -0800</creation_ts>
          <short_desc>caret positioning is broken in vertical writing modes</short_desc>
          <delta_ts>2025-04-17 06:44:29 -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>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>283620</dup_id>
          
          <bug_file_loc>https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cp%20style%3D%22height%3A%205em%3B%20border%3A%20solid%20gray%3B%20writing-mode%3A%20vertical-rl%22%20contenteditable%3EThis%20is%20some%20vertical%20text%20that%20you%20can%20select%20and%20edit.</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>287533</dependson>
          <blocked>49408</blocked>
    
    <blocked>286725</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="fantasai">fantasai.bugs</reporter>
          <assigned_to name="fantasai">fantasai.bugs</assigned_to>
          <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2091609</commentid>
    <comment_count>0</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-02-03 14:45:32 -0800</bug_when>
    <thetext>Overview:

Carets aren&apos;t drawn correctly in vertical writing modes such as `vertical-rl` and `sideways-rl`. The insertion point seems to be correct, though.

Steps to Reproduce:
1. Create or open a testcase with editable vertical text (such as the URL in this bug report).
2. Try to place the caret near the beginning of the 2nd or 3rd line.
3. Try typing some text at that point.

Actual Results:
Although the insertion point is identified correctly, the caret is drawn further down from the actual insertion point.

Expected Results:
Caret position and insertion point match, and are as close as possible to the click point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2091610</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-02-03 14:46:10 -0800</bug_when>
    <thetext>&lt;rdar://problem/144117372&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2091626</commentid>
    <comment_count>2</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-02-03 15:29:27 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/39939</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2092294</commentid>
    <comment_count>3</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-02-05 15:53:23 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/40087</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2094700</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-02-13 20:00:42 -0800</bug_when>
    <thetext>Committed 290387@main (12e65d787eb0): &lt;https://commits.webkit.org/290387@main&gt;

Reviewed commits have been landed. Closing PR #40087 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2094709</commentid>
    <comment_count>5</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-02-13 22:19:22 -0800</bug_when>
    <thetext>Accidentally tagged this issue in the commit for https://github.com/WebKit/WebKit/pull/40087 instead of tagging the correct issue https://bugs.webkit.org/show_bug.cgi?id=286725 :((((

Reopening. This bug is associated with https://github.com/WebKit/WebKit/pull/39939 only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2094712</commentid>
    <comment_count>6</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-02-13 22:22:36 -0800</bug_when>
    <thetext>And that PR is held up on the fix causing an accessibility regression. It&apos;s possible accessibility is hacking around the bug, and this regresses it somehow. (It&apos;s pretty obvious the existing code in that function is incorrect, since it&apos;s adding x and y coordinates together in vertical writing modes.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2094857</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-02-14 12:40:11 -0800</bug_when>
    <thetext>Committed 289651.119@safari-7621-branch (d9a4868aa344): &lt;https://commits.webkit.org/289651.119@safari-7621-branch&gt;

Reviewed commits have been landed. Closing PR #2604 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2100503</commentid>
    <comment_count>8</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-03-04 21:04:58 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 283620 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>