Bug 231578

Summary: Caret positioning in an empty contenteditable with an :after pseudo-element is misaligned when a line-height is specified
Product: WebKit Reporter: Jordan Scales <scalesjordan>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, megan_gardner, mmaxfield, simon.fraser, webkit-bug-importer, wenson_hsieh, zalan
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac (Intel)   
OS: macOS 11   
Attachments:
Description Flags
A minimum repro of the bug none

Description Jordan Scales 2021-10-12 07:41:52 PDT
Created attachment 440928 [details]
A minimum repro of the bug

An empty <div contenteditable> with an :after pseudo-element does not place the caret in the correct place when a line-height is specified. Upon typing in the contenteditable, the caret is aligned correctly. This bug is not present when line-height is set to normal.

A minimum repro has been attached.

User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15
Comment 1 Radar WebKit Bug Importer 2021-10-19 07:42:17 PDT
<rdar://problem/84414464>