- From: Olivier Forget <teleclimber@gmail.com>
- Date: Wed, 26 Nov 2014 00:22:38 +0000
- To: Ben Peters <Ben.Peters@microsoft.com>, public-editing-tf <public-editing-tf@w3.org>
- Message-ID: <CAA5DY6a9BUWXnx__Lvdc4MUSx78tSj9otUH2feHVWpFVMBS5TA@mail.gmail.com>
That would work for me. On Tue, Nov 25, 2014, 3:39 PM Ben Peters <Ben.Peters@microsoft.com> wrote: > Great question. I think we should fire a “replace” or “insert” intention > (via beforeInput) that has the following default behavior: > > > > 1) If the selection is not collapsed, abort these steps > > 2) Insert text (which needs more detail) > > > > This way there is no ambiguity, and authors don’t have to handle > inserttext and IMEs. They just have to clear the selection in the intention > event handler and then let the browser do the rest. > > > > *From:* Olivier Forget [mailto:teleclimber@gmail.com] > *Sent:* Tuesday, November 25, 2014 3:35 PM > *To:* Ben Peters; public-editing-tf > *Subject:* Re: Only Text Input and Intention Events > > > > Hi Ben, > > Sounds good to me. Question though: in your view of things, what is the > default behavior if user inputs text while some content is selected? > > On Tue, Nov 25, 2014, 11:12 AM Ben Peters <Ben.Peters@microsoft.com> > wrote: > > Let’s bring this conversation full circle. I think the first thing we > should do is create a new type of contentEditable that only supports > inserting characters by default. If a user types using an IME, keyboard, > speech, etc, the browser fires beforeInput with the characters to insert > and then inserts them by default. For anything else* the browser fires > beforeInput with context data and then does nothing by default. The key is > that all types of input can be handled in script by responding to Intention > Events, with the exception of IME input, which means only character > insertion should have a default behavior. If there are low-level apis we > need to make this possible, we’ll create them going forward. If this sounds > like a reasonable V1, let’s get it spec’d and taken to FPWD. > > > > *Things that have no default behavior in V1: newlines, deletion, > formatting, pasting, inserting html, etc. > > > > Ben > > > >
Received on Wednesday, 26 November 2014 00:23:05 UTC