- From: Piotrek Koszuliński <notifications@github.com>
- Date: Wed, 21 Mar 2018 08:56:54 -0700
- To: w3c/selection-api <selection-api@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/selection-api/issues/70/374990818@github.com>
This problem is much deeper. It's not only about triple click but also about making a whole-line selection by mouse. In such case, the selection may also span outside the block that you're trying to select. This wouldn't be such a problem if all browsers were rendering EOL selections in a visible way. E.g. this is the same selection in Chrome and Safari: ![image](https://user-images.githubusercontent.com/156149/37720280-42e9bbc0-2d27-11e8-8d1b-fd7c4de55419.png) ![image](https://user-images.githubusercontent.com/156149/37720293-49120714-2d27-11e8-95d4-e5760642040b.png) In both cases, I did it by mouse. But the same happens on triple click. And while we could standardize triple click's behaviour, the problem would remain, because an RTE still needs to handle selections made by a mouse. Finally, we can't completly get rid of such selections: ```html <p>[xxx</p> <p>]yyy</p> ``` Because we need to support shift+left/right which allows you to toggle between the above and: ```html <p>[xxx]</p> <p>yyy</p> ``` ---- I also checked how EOL selection looks in Pages (native) and Google Docs (custom selection rendering): ![image](https://user-images.githubusercontent.com/156149/37720747-354c55e4-2d28-11e8-81ad-67f3c5fb84da.png) ![image](https://user-images.githubusercontent.com/156149/37720761-3f582748-2d28-11e8-853d-064bc8c1afba.png) GDocs does the same thing like Chrome – it extends the end of the selection rect ~20px to the right when you add EOL to the selection. Pages renders a pilcrow there. ---- PS. In most RTEs (I checked CKEditor 5, GDocs, Pages) applying a block format (e.g. a heading) to the below selection affects only the first block: ```html <p>[xxx</p> <p>]yyy</p> ``` Which, IMO, is a thing that needs to be implemented by the RTE itself. A block at which boundary the selection ends, should not be affected by such commands. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/selection-api/issues/70#issuecomment-374990818
Received on Wednesday, 21 March 2018 15:57:16 UTC