-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define behavior of pressing enter in inline editing host #430
Comments
@chrishtr can you help get this on the Editing WG agenda? It would be good to have an editing expert read the test and summarize in simpler terms what the important aspects are. I think it has to do with inserting a different element to represent the new line/paragraph depending on what the parent element is, to not end up with |
I intended so. I think |
Thanks for explaining @masayuki-nakano! How should "proper editable ancestor" be defined here? |
I guess that these steps may roughly match with existing
|
Hi @masayuki-nakano, could you clarify what you mean by "context" here?
Could you say what conditions lead to "can not have the new default paragraph as a child"? Does this mean "if the container is inline"? If so, would that be determined by tag name or actual inline style?
Could you say more about why this specific list of elements? |
I meant that it creates a things which are enclosed in a group of content, it should not be duplicated like
I'm thinking about the relation between parent element and child element (new default paragraph) from HTML spec point of view.
They won't have new default paragraphs in any browsers, I think. They will become the left node, and browsers put the right node for it. |
I discussed it within Chromium and we think that the algorithm can be simplified to insert a simple line break (
This is implemented in Chromium here. The part about phrasing content was added recently, and has not yet been successfully shipped to the stable channel. It's based on an equivalent change to WebKit. |
@chrishtr What is the "enclosing block" definition? Which one if |
It's the highest editable ancestor element in the DOM which is a block. If the |
TPAC 2023 |
Was there some further update on this? Is Simon @zcorpan or another Simon? |
It was probably me! Apologies for the delay. The tests referenced in OP pass now! So it seems we already have interoperable behavior and the spec needs updating to reflect what is implemented. |
There are tentative tests for this:
https://github.com/web-platform-tests/wpt/blob/master/editing/other/insertparagraph-in-inline-editing-host.tentative.html
https://wpt.fyi/results/editing/other?label=experimental&label=master&product=chrome&product=firefox&product=safari&aligned&view=interop&q=label%3Ainterop-2023-webcompat
The tests are part of the Interop 2023 Web Compat focus area, but there's no spec for it.
If the behavior can be written down in some specification (whatever its standards track status) managed by the Editing WG, it will be much easier to implement something in Chromium that we can be confident matches the consensus of the WG.
(To reverse engineer the exact behavior from the tests isn't generally possible unless tests cover all possibilities.)
The text was updated successfully, but these errors were encountered: