<?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>13820</bug_id>
          
          <creation_ts>2007-05-22 11:39:58 -0700</creation_ts>
          <short_desc>Height of cursor should be same as height of text, not line-height</short_desc>
          <delta_ts>2023-11-15 18:08:51 -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>HTML Editing</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>249621</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P4</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sridhar Gurivireddy">just1gb</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>joone</cc>
    
    <cc>rniwa</cc>
    
    <cc>victor.singh1983</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>webkit</cc>
    
    <cc>yurtaev.egor</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>9429</commentid>
    <comment_count>0</comment_count>
    <who name="Sridhar Gurivireddy">just1gb</who>
    <bug_when>2007-05-22 11:39:58 -0700</bug_when>
    <thetext>When CSS attribute line-height is specified for &lt;textarea&gt;, height of cursor shown is equal to the value of attribute specified.

Spec &quot;http://www.w3.org/TR/REC-CSS1#line-height&quot; does not say anything about cursor size.

Behaviour

Safari: Shows a big cursor.
IE: shows smaller cursor (equal to height of text, not line-height)

Firefox: Definitely buggy.. shows big cursor for first charecter, shows smaller cursor for other charecters in a line</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4897</commentid>
    <comment_count>1</comment_count>
      <attachid>15500</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-13 05:27:58 -0700</bug_when>
    <thetext>Created attachment 15500
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4899</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-13 05:32:50 -0700</bug_when>
    <thetext>Confirmed with r24182. The behavior is slightly different from what Tiger WebKit had, but this probably doesn&apos;t qualify it as a regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62711</commentid>
    <comment_count>3</comment_count>
      <attachid>17595</attachid>
    <who name="amit">amitjoshi_79</who>
    <bug_when>2007-11-29 12:43:34 -0800</bug_when>
    <thetext>Created attachment 17595
patch for fixing the cursor height issue 

It a simple patch that should fix the cursor height issue in the caretRect method of RenderText. Also I had to override caretRect in RenderTextControlInnerBlock to take care of the initial state of the cursor (before first text char is entered).

This is my first attempt to hack webkit code- so please let me know if I am not following the process correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62712</commentid>
    <comment_count>4</comment_count>
      <attachid>17595</attachid>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2007-11-29 12:47:52 -0800</bug_when>
    <thetext>Comment on attachment 17595
patch for fixing the cursor height issue 

On Mac, the height of the caret is the full height of the line and not just the height of the text.  I am not sure what platform you are writing this for, but this may be a platform behavioral difference that needs an #ifdef.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62713</commentid>
    <comment_count>5</comment_count>
      <attachid>17595</attachid>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2007-11-29 12:49:27 -0800</bug_when>
    <thetext>Comment on attachment 17595
patch for fixing the cursor height issue 

I would need to check to see what OS X textareas do, but generic editing (like TextEdit) uses the full height of the root line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62714</commentid>
    <comment_count>6</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2007-11-29 12:54:56 -0800</bug_when>
    <thetext>Bring up TextEdit on the Mac and set spacing to &quot;double.&quot;  You will see that our behavior matches TextEdit.  If we decide this behavior needs to be different on non-Mac platforms, there&apos;s a lot more work to do than merely patching caretRect, since selection also behaves this way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62716</commentid>
    <comment_count>7</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2007-11-29 13:09:05 -0800</bug_when>
    <thetext>If you&apos;re going for more Windows-like behavior, I would suggest that RenderTheme have a new method like &quot;usesRaggedSelection.&quot;  Then many places will have to check that and change their behavior accordingly.  You would probably want to turn off selection gap filling off as well, as it no longer makes much sense if your selection is going to be ragged and ugly (ducks).


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62737</commentid>
    <comment_count>8</comment_count>
    <who name="amit">amitjoshi_79</who>
    <bug_when>2007-11-29 17:38:16 -0800</bug_when>
    <thetext>I was only testing on windows platform, but I guess I did miss the selection issue. 
Earlier comment on this issue suggested that the behavior on IE is better in this respect and I guess thats what I tried to achieve (except for the selection).
I&apos;ll see if I can fix that as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>534595</commentid>
    <comment_count>9</comment_count>
    <who name="">victor.singh1983</who>
    <bug_when>2012-01-11 23:35:52 -0800</bug_when>
    <thetext>Hi 

Applied this patch on Icecream sandwich webkit.


But if we change the font size then cursor size does,nt change

We have tried this use case on midas demo

http://www-archive.mozilla.org/editor/midasdemo/

Please help this new bie


Thanks and Regards
Victor</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>534639</commentid>
    <comment_count>10</comment_count>
    <who name="">victor.singh1983</who>
    <bug_when>2012-01-12 01:07:27 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; Hi 
&gt; 
&gt; Applied this patch on Icecream sandwich webkit.
&gt; 
&gt; 
&gt; But if we change the font size then cursor size does,nt change
&gt; 
&gt; We have tried this use case on midas demo
&gt; 
&gt; http://www-archive.mozilla.org/editor/midasdemo/
&gt; 
&gt; Please help this new bie
&gt; 
&gt; 
&gt; Thanks and Regards
&gt; Victor

While debugging i have found that

locclcaretRect() in RenderTextControlInnerBlock never gets called</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>534644</commentid>
    <comment_count>11</comment_count>
    <who name="">victor.singh1983</who>
    <bug_when>2012-01-12 01:22:01 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; Hi 
&gt; 
&gt; Applied this patch on Icecream sandwich webkit.
&gt; 
&gt; 
&gt; But if we change the font size then cursor size does,nt change
&gt; 
&gt; We have tried this use case on midas demo
&gt; 
&gt; http://www-archive.mozilla.org/editor/midasdemo/
&gt; 
&gt; Please help this new bie
&gt; 
&gt; 
&gt; Thanks and Regards
&gt; Victor

While debugging i have found that

locclcaretRect() in RenderTextControlInnerBlock never gets called</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>535612</commentid>
    <comment_count>12</comment_count>
    <who name="">victor.singh1983</who>
    <bug_when>2012-01-13 05:43:15 -0800</bug_when>
    <thetext>Hi,

I have made change that is make a new function to handle fontFace and fontSize

and checked from editor if selected text is zero if not then insertHTML

 &quot;&lt;font size=\&quot;&quot;+ fontSizeValue + &quot;\&quot; face=\&quot;&quot; + fontNameValue + &quot;\&quot;&gt;&quot; + &quot;&amp;#27;&lt;/font&gt;&quot;;

However it creates one issue that if user keeps changing the fonts at the same cursor position then we will have lot of font elements

so need to remove such font element which have only escape chracter inside them

Thanks Victor</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255356</commentid>
    <comment_count>13</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-12-01 12:37:27 -0800</bug_when>
    <thetext>&lt;rdar://problem/29464647&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882389</commentid>
    <comment_count>14</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-12 07:29:12 -0700</bug_when>
    <thetext>I am not able to reproduce this bug in Safari 15.5 on macOS 12.4 based not attached test case and I test via following:

1) Caret Indicator is of normal size and I typed multiple words and there was no changes in the caret indicator size.
2) I hovered the cursor on the &lt;textarea&gt; and there was no change in cursor size. (With and without text present in the &lt;textarea&gt;)

Both of above tests were performed while loading the test case in Private Window. It matches with other browsers (Chrome Canary 105 and Firefox Nightly 104).

I think it got fixed along the way (if I am testing it correctly) and can be marked as &quot;RESOLVED CONFIGURATION CHANGED&quot;. If I am testing incorrectly, please retest accordingly or add some more instruction clarity. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882901</commentid>
    <comment_count>15</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-07-12 20:29:28 -0700</bug_when>
    <thetext>This is still a problem. Just hit Return in the attached test case, and the cursor height changes to line-height. Chrome works correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959725</commentid>
    <comment_count>16</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-06-03 17:18:36 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #15)
&gt; This is still a problem. Just hit Return in the attached test case, and the
&gt; cursor height changes to line-height. Chrome works correctly.

@ap - I am not able to reproduce this on &apos;Return&apos; as well in Safari 16.5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959727</commentid>
    <comment_count>17</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-06-03 17:59:38 -0700</bug_when>
    <thetext>Still reproduces for me. The cursor becomes much bigger after pressing Return.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1992963</commentid>
    <comment_count>18</comment_count>
    <who name="Joone Hur">joone</who>
    <bug_when>2023-11-15 18:08:51 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 249621 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>15500</attachid>
            <date>2007-07-13 05:27:58 -0700</date>
            <delta_ts>2007-07-13 05:27:58 -0700</delta_ts>
            <desc>test case</desc>
            <filename>textarea.html</filename>
            <type>text/html</type>
            <size>69</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PHRleHRhcmVhIHN0eWxlPSJsaW5lLWhlaWdodDo1OyB3aWR0aDo0MDA7IGhlaWdodDo0MDA7Ij4K
PC90ZXh0YXJlYT4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>17595</attachid>
            <date>2007-11-29 12:43:34 -0800</date>
            <delta_ts>2010-06-10 15:13:58 -0700</delta_ts>
            <desc>patch for fixing the cursor height issue </desc>
            <filename>patch#13820</filename>
            <type>text/plain</type>
            <size>1979</size>
            <attacher name="amit">amitjoshi_79</attacher>
            
              <data encoding="base64">SW5kZXg6IFJlbmRlclRleHQuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFJlbmRlclRleHQuY3BwCShyZXZp
c2lvbiAyODAyNCkKKysrIFJlbmRlclRleHQuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC0zNTksOSAr
MzU5LDggQEAgSW50UmVjdCBSZW5kZXJUZXh0OjpjYXJldFJlY3QoaW50IG9mZnNldAogICAgIGlm
ICghYm94KQogICAgICAgICByZXR1cm4gSW50UmVjdCgpOwogCi0gICAgaW50IGhlaWdodCA9IGJv
eC0+cm9vdCgpLT5ib3R0b21PdmVyZmxvdygpIC0gYm94LT5yb290KCktPnRvcE92ZXJmbG93KCk7
Ci0gICAgaW50IHRvcCA9IGJveC0+cm9vdCgpLT50b3BPdmVyZmxvdygpOwotC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          status="-"
          setter="hyatt"
    />
          </attachment>
      

    </bug>

</bugzilla>