- From: Michael Aufreiter <notifications@github.com>
- Date: Thu, 11 Dec 2025 06:40:09 -0800
- To: w3c/editing <editing@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 11 December 2025 14:40:13 UTC
michael left a comment (w3c/editing#496)
The really surprising thing here is that the behavior depends on whether the parent of that empty div is `position: relative` (content leaks) or not (desired behavior).
A starting point for spec could be that modifications of the DOM must be local, which means no area outside of the start selection of a single-input or composition should be affected with a DOM change.
E.g. in my repro example, when the selection anchor/focus node is inside or including the 'editable-field' div, that div must not be wiped entirely.
```html
<div class="editable-canvas" contenteditable="true">
<div class="editable-wrapper">
<div class="editable-field"><br /></div>
</div>
</div>
```
Currently when putting the cursor into the editable field and start a composition you end up with:
```html
<div class="editable-canvas" contenteditable="true">
</div>
```
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/496#issuecomment-3642242364
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/editing/issues/496/3642242364@github.com>
Received on Thursday, 11 December 2025 14:40:13 UTC