WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 249621
13820
Height of cursor should be same as height of text, not line-height
https://bugs.webkit.org/show_bug.cgi?id=13820
Summary
Height of cursor should be same as height of text, not line-height
Sridhar Gurivireddy
Reported
2007-05-22 11:39:58 PDT
When CSS attribute line-height is specified for <textarea>, height of cursor shown is equal to the value of attribute specified. Spec "
http://www.w3.org/TR/REC-CSS1#line-height
" 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
Attachments
test case
(69 bytes, text/html)
2007-07-13 05:27 PDT
,
Alexey Proskuryakov
no flags
Details
patch for fixing the cursor height issue
(1.93 KB, patch)
2007-11-29 12:43 PST
,
amit
hyatt
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2007-07-13 05:27:58 PDT
Created
attachment 15500
[details]
test case
Alexey Proskuryakov
Comment 2
2007-07-13 05:32:50 PDT
Confirmed with
r24182
. The behavior is slightly different from what Tiger WebKit had, but this probably doesn't qualify it as a regression.
amit
Comment 3
2007-11-29 12:43:34 PST
Created
attachment 17595
[details]
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.
Dave Hyatt
Comment 4
2007-11-29 12:47:52 PST
Comment on
attachment 17595
[details]
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.
Dave Hyatt
Comment 5
2007-11-29 12:49:27 PST
Comment on
attachment 17595
[details]
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.
Dave Hyatt
Comment 6
2007-11-29 12:54:56 PST
Bring up TextEdit on the Mac and set spacing to "double." You will see that our behavior matches TextEdit. If we decide this behavior needs to be different on non-Mac platforms, there's a lot more work to do than merely patching caretRect, since selection also behaves this way.
Dave Hyatt
Comment 7
2007-11-29 13:09:05 PST
If you're going for more Windows-like behavior, I would suggest that RenderTheme have a new method like "usesRaggedSelection." 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).
amit
Comment 8
2007-11-29 17:38:16 PST
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'll see if I can fix that as well.
victor.singh1983
Comment 9
2012-01-11 23:35:52 PST
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
victor.singh1983
Comment 10
2012-01-12 01:07:27 PST
(In reply to
comment #9
)
> 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
While debugging i have found that locclcaretRect() in RenderTextControlInnerBlock never gets called
victor.singh1983
Comment 11
2012-01-12 01:22:01 PST
(In reply to
comment #9
)
> 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
While debugging i have found that locclcaretRect() in RenderTextControlInnerBlock never gets called
victor.singh1983
Comment 12
2012-01-13 05:43:15 PST
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 "<font size=\""+ fontSizeValue + "\" face=\"" + fontNameValue + "\">" + "</font>"; 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
Radar WebKit Bug Importer
Comment 13
2016-12-01 12:37:27 PST
<
rdar://problem/29464647
>
Ahmad Saleem
Comment 14
2022-07-12 07:29:12 PDT
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 <textarea> and there was no change in cursor size. (With and without text present in the <textarea>) 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 "RESOLVED CONFIGURATION CHANGED". If I am testing incorrectly, please retest accordingly or add some more instruction clarity. Thanks!
Alexey Proskuryakov
Comment 15
2022-07-12 20:29:28 PDT
This is still a problem. Just hit Return in the attached test case, and the cursor height changes to line-height. Chrome works correctly.
Ahmad Saleem
Comment 16
2023-06-03 17:18:36 PDT
(In reply to Alexey Proskuryakov from
comment #15
)
> This is still a problem. Just hit Return in the attached test case, and the > cursor height changes to line-height. Chrome works correctly.
@ap - I am not able to reproduce this on 'Return' as well in Safari 16.5.
Alexey Proskuryakov
Comment 17
2023-06-03 17:59:38 PDT
Still reproduces for me. The cursor becomes much bigger after pressing Return.
Joone Hur
Comment 18
2023-11-15 18:08:51 PST
*** This bug has been marked as a duplicate of
bug 249621
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug