contenteditable has a different wrapping behavior in Gecko and WebKit/Blink
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
Webcompat Priority | P3 |
People
(Reporter: karlcow, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
image/png
|
Details |
Steps to reproduce
- Enter the following in the URL bar in each latest version of browser.
data:text/html,<!doctype html><html><div style="border: 1px solid black; width: 5ch;" contenteditable>AAAAAAA</div>
- Firefox: The text breaks out of the box
- WebKit/Blink: The text wraps and the box automatically extends its height.
This was inherited from WebKit code 17 years ago.
This is done here.
case ContentEditableType::True:
addPropertyToPresentationalHintStyle(style, CSSPropertyWordWrap, CSSValueBreakWord);
addPropertyToPresentationalHintStyle(style, CSSPropertyWebkitNbspMode, CSSValueSpace);
addPropertyToPresentationalHintStyle(style, CSSPropertyLineBreak, CSSValueAfterWhiteSpace);
#if PLATFORM(IOS_FAMILY)
addPropertyToPresentationalHintStyle(style, CSSPropertyWebkitTextSizeAdjust, CSSValueNone);
#endif
break;
It seems to have been there for a long time. moved from Frame.cpp into HTMLElementImpl.cpp
https://github.com/WebKit/WebKit/commit/c68912f97deea7782d6c1b6aab872e5d93365de2
It was carried away from on Oct 15, 2004
https://github.com/WebKit/WebKit/commit/9d7af8297974d9263c22f90d43074ebbbe439381#diff-c8205393c9f57e84bfe70e703391bcc951d7d0b9177394c638d35905eed918ccR5493-R5503
In Gecko the [contenteditable] CSS is available in a dedicated CSS
https://searchfox.org/mozilla-central/source/layout/style/contenteditable.css
https://bugzilla.mozilla.org/show_bug.cgi?id=237964 (June 2007)
There's a dicussion in 2014 on the CSS mailing list
https://lists.w3.org/Archives/Public/www-style/2014Oct/thread.html#msg408
but the discussion kind of died without defining what should be the specific behavior.
At the time of the discussion, IE/Firefox were in one camp and WebKit/Blink in the other.
I don't remember Webcompat report from the top of my head about it.
The spec itself is not clear about the behavior too.
Reporter | ||
Comment 1•3 years ago
|
||
This is discussed here on WebKit
https://bugs.webkit.org/show_bug.cgi?id=138068
We have had a couple sites submitted to us that aren't working for our users due to an interop issue between IE/FF & Chrome/Safari.
But no followup after that.
Reporter | ||
Comment 2•3 years ago
|
||
Google seems to have made attempts at fixing Blink.
https://bugs.chromium.org/p/chromium/issues/detail?id=427135
Reporter | ||
Comment 3•3 years ago
|
||
Just to clarify, Maybe there is nothing to fix on Gecko, Just opened the bug to have a placeholder for eventual discussion on the interop side of things in between WebKit, Blink and Gecko.
Reporter | ||
Comment 4•3 years ago
|
||
More recent discussion about it.
https://github.com/w3c/editing/issues/145
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 5•2 years ago
|
||
I think that this is a layout issue (enhancement?).
Description
•