Bug 51618 - Having a top margin on a contenteditable element makes "enter" insert too much vertical space
Summary: Having a top margin on a contenteditable element makes "enter" insert too muc...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-26 09:47 PST by Nico Weber
Modified: 2022-12-01 15:28 PST (History)
2 users (show)

See Also:


Attachments
repro case (464 bytes, text/html)
2010-12-26 09:47 PST, Nico Weber
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2010-12-26 09:47:01 PST
Created attachment 77457 [details]
repro case

Having a top margin on a contenteditable element makes "enter" insert too much vertical space. See attached test case.

Expected: On "enter", the caret moves down by one line height.
Actual: On "enter", the caret moves down by one line height plus the top margin.
Comment 1 Nico Weber 2010-12-26 09:47:34 PST
Works fine in Ff3.6 and Ff4 beta.
Comment 2 Ahmad Saleem 2022-12-01 15:28:23 PST
All browsers (Safari Technology Preview 159, Chrome Canary 110 and Firefox Nightly 109) are adding similar space (more than line height) after pressing "Enter".

Marking this as "RESOLVED CONFIGURATION CHANGED", please reopen if it is issue and something all browsers need to fix. Thanks!