Re: Default Caret and Selection Positioning Spec?

On Tue, Dec 9, 2014 at 10:22 AM, Frederico Knabben <f.knabben@cksource.com>
wrote:

> Btw, things that came to my mind:
>
> * Caret movement direction - from inside or from outside. E.g.:
> <b>ab|c</b>de -> ARROW-RIGHT
> <b>abc|</b>de -> ARROW-RIGHT
> <b>abc</b>d|e
>
> <b>abc</b>d|e -> ARROW-LEFT
> <b>abc</b>|de -> ARROW-LEFT
> <b>ab|c</b>de
>

Ok, wouldn't this mean in the second example of each that new content being
added to the inline element or not depends which arrow key was pressed
previously? Couldn't this lead to confusion when the user doesn't know
which arrow key was pressed last? And what is the element is the very last
in the document so that the user can't go further right than this element?
Does that mean the user can't go behind the last inline element?And what
about mouse-clicks? Should it be treated like arrow-right or arrow-left?


>
> * If anything is "skipped" by the caret, its movement should work like
> over a character. E.g. (ARROW-RIGHT):
> a|<img>b
> a<img>|b
>
> a|<span cE=false>bc</span>d
> a<span cE=false>bc</span>|d
>

These two are as we have discussed here:
https://github.com/w3c/selection-api/issues/27#issuecomment-65732595


>
> a|<span cE=false>b<span cE=true>c</span></span>d
> a<span cE=false>b<span cE=true>|c</span></span>d ("b" skipped)
>

agreed.

>
> a|<span cE=false><span cE=true>b</span>c</span>d
> a<span cE=false><span cE=true>b|</span>c</span>d (nothing to skip)
>

This one seems more questionably to me.  What would the use case be to not
have the caret be able to go in front of the "b"? It seems like users would
need "hack" this by adding a zero-width space to the outer span to get
around this limitation. That doesn't seem right.

We discussed some related cases in the  above URL.


>
> * Movement to outside the current block counts like a character movement
> to the very next available caret position (probably obvious). E.g.
> (ARROW-RIGHT):
> <p>abc|</p><p>def</p>
> <p>abc</p><p>|def</p>
>
> <td>abc|</td><td>def</td>
> <td>abc</td><td>|def</td>
>

agreed.

>
> * Tricky: inline elements at start/end of line. To define.
> * Tricky: links at start/end of line. To define.
>

Should A-elements necessarily be treated differently than other elements? I
can see the point that one wants to treat italics and links differently,
but it doesn't seem very HTML5-like not to be able to imitate A-elements
with a combination of span-elements and CSS styling. Maybe this could be a
CSS property and the defaults for I-elements and A-elements could be so
that current behavior is imitated?


> Anyway, I'm sure we could make this list long.
>
> Q1: Should we start this kind of discussion here?
>

Here or some other place. But we definitely need to have it.


> Q2: Should we have a shared document to work on? Where?
>

> Fred
>
> --
> Frederico Knabben
> CKEditor Project Lead and CKSource Owner
> --
> CKSource - http://cksource.com
> --
> Follow us on: Twitter <http://twitter.com/ckeditor> | Facebook
> <http://www.facebook.com/ckeditor> | Google+
> <https://plus.google.com/107736718646302128806> | LinkedIn
> <http://www.linkedin.com/company/cksource>
>



-- 
Johannes Wilm
Fidus Writer
http://www.fiduswriter.org

Received on Tuesday, 9 December 2014 10:25:54 UTC