- From: Olivier Forget <teleclimber@gmail.com>
- Date: Thu, 27 Nov 2014 10:39:23 -0800
- To: Johannes Wilm <johannes@fiduswriter.org>
- Cc: Ben Peters <Ben.Peters@microsoft.com>, public-editing-tf <public-editing-tf@w3.org>
- Message-ID: <CAA5DY6aCr8o26ifiBY6BUrGwuME9GHumSfdiMotHeX3Kns4hmQ@mail.gmail.com>
On Wed, Nov 26, 2014 at 5:20 PM, Johannes Wilm <johannes@fiduswriter.org> wrote: > > > On Wed, Nov 26, 2014 at 9:03 PM, Olivier Forget <teleclimber@gmail.com> > wrote: > >> On Wed, Nov 26, 2014 at 12:27 AM, Johannes Wilm <johannes@fiduswriter.org >> > wrote: >> >>> Also sounds good to me. >>> What happens if the caret is at the end/right behind a link/bold >>> text/italic text? Does the text go inside the link/bold/italic or outside >>> it? It may not matter that much which one you choose, as long as it is >>> consistent. >>> >>> Good question. >> >> I think the text should go exactly at the position that is reported by >> window.getSelection(). So if the anchorNode is the text node inside the >> <a>, then typing will go inside the <a>. >> > > Ok, from a technical point, but the user just sees the cursor right at the > end of a link. If getSelection in that situation says that the cursor is > outside of it in IE and inside of it in Firefox, the result still appears > as different behavior to the end user. > > True, but this is part of a larger conundrum of rich text editing (on all platforms): there are two legitimate styles for newly entered text when the cursor is right at the interface of two styles. Which one is the right one? I think that's for editor devs to decide depending on their situation. Editor devs can listen for text insert event, and if text is about to be inserted in the wrong node they can move the selection to the right place then let the default behavior take place. > >> This all makes me think that this mode is something that noone ever > expects to be useful by itself, without any javascript to support it. > > Yes. My view is that this is a developer's API.
Received on Thursday, 27 November 2014 18:39:50 UTC