Bug 144350 - Cursor takes full height of contenteditable div if it's inline-block and has pseudo-element
Summary: Cursor takes full height of contenteditable div if it's inline-block and has ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.10
: P2 Minor
Assignee: Nobody
URL: http://jsfiddle.net/tobek/gusrp1cj/1/
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-28 12:57 PDT by Toby Fox
Modified: 2022-10-08 07:16 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toby Fox 2015-04-28 12:57:29 PDT
Summary about sums it up.

Here is a minimal example: http://jsfiddle.net/tobek/gusrp1cj/1/

I ran into this issue while using pure-CSS placeholders (e.g. with selector `[contenteditable]:empty:before`) on an inline-block contenteditable element.

Above jsfiddle reproduces it for me on OS X 10.10 on Chrome (v42.0.2311.90, webkit v537.36) and Safari (v8.0.4, webkit v600.4.10), but not Firefox.
Comment 1 Toby Fox 2015-04-28 13:04:10 PDT
May be related to https://bugs.webkit.org/show_bug.cgi?id=126193 and potentially also https://bugs.webkit.org/show_bug.cgi?id=105898, since both concern bugs with inline-block contenteditable divs. However, an example given for the former bug (http://jsfiddle.net/TNfeL/) does NOT have any problems in latest WebKit so that bug may be fixed.
Comment 2 Ahmad Saleem 2022-10-08 07:15:54 PDT
I am able to replicate this bug in Safari Technology Preview 155 using attached JSFiddle from URL Field and in third case (mentioned as broken), the caret height is same as line height.

For some reason, Chrome Canary 108 does not show any caret except while I start typing and it is of normal height for all three use cases. While Firefox Nightly 107 is fine and show "normal" caret height for third case.

Just wanted to update the latest testing results. Thanks!

Note - it might be duplicate of bug 135914, which is also appearing and breaking "Yammer" Live Chat Question box by not showing caret, I believe.

I have fix for bug 135914 but I don't know whether it will fix this issue or not but just wanted to post updated information. Thanks!