- From: Cristian Talau <notifications@github.com>
- Date: Thu, 28 May 2015 06:56:28 -0700
- To: w3c/editing-explainer <editing-explainer@noreply.github.com>
Received on Thursday, 28 May 2015 13:57:01 UTC
I second that implementing UP/DOWN caret navigation in JS is quite complex. I also agree with @kojiishi that specifying the UA hidden selection-associated state is not a good idea. Maybe, we can use the `beforeselectionchange` event and add a `setResultRange` method to it that can be used to change the selection. This method would know the user intention, so it would be able to preserve whatever hidden selection-related state the UA uses. ``` document.addEventListener('beforeselectionchange', function(e){ var sel = e.targetRange; var resultSel = ...; e.setResultRange(resultSel); }); ``` This would be similar to the Clipboard Events, where you can use the `clipboardData` event property to specify the actual data to be copied. --- Reply to this email directly or view it on GitHub: https://github.com/w3c/editing-explainer/issues/56#issuecomment-106321057
Received on Thursday, 28 May 2015 13:57:01 UTC