Re: [editing] Legal caret positions – invisible text nodes (#75)

> Is that a text node with lots of empty spaces before a block (<p>) node?

Yes.

> No, I don't think that should just happen. If this is because HTML has been loaded into the DOM in some way, then that import process should be changed.

It wouldn't happen in CKEditor as it normalizes white-spaces. But the spec currently says that it's a legal position so if some other editor won't normalizes white-spaces and someone will try to place the caret there by using JS, then (according to the spec) the browser should render such caret. If the browser people are OK with this, then we're fine.

BTW. According to the spec there's a difference between:

```
<div><p>x</p></div>
```

and


```
<div>
            <p>x</p></div>
```

In the first case there's no legal caret position before `<p>` while in the second there is. But again – just pointing out. It's fine for me as it would not affect an RTE which keeps the DOM clean.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/75#issuecomment-133729715

Received on Saturday, 22 August 2015 17:26:08 UTC