Re: Way forward and IME behavior speccing

> On 12 Oct 2015, at 23:49, Koji Ishii <kojiishi@gmail.com> wrote:
> 
> On Mon, Oct 12, 2015 at 11:06 PM, Florian Rivoal <florian@rivoal.net <mailto:florian@rivoal.net>> wrote:
> 
> > On 12 Oct 2015, at 21:46, Koji Ishii <kojiishi@gmail.com <mailto:kojiishi@gmail.com>> wrote:
> >
> > I basically agree with rniwa. Let's focus on things that bothers editor JS developers today. "Not messing DOM at all" itself shouldn't be our goal, it should be "only where it really bothers."
> 
> This seems contradictory. "Messing with the DOM" is bothering JS editor developers today, because then the DOM becomes inconsistent with their internal model. For example, implementing "undo" if you were the one doing all the changes to the DOM is much easier than if you also have to watch the dom in case something else changes it, and reconstruct these changes into steps that can be undone.
> 
> You're right, but it's not contradicting. We need to avoid "messing with the DOM" where JS developers need to undo. Do we know where JS undoes what IME did? We can add sentences to define that then, but "at all" is not required to help JS developers.

From the users point of view whether some text was typed by keyboard directly or through an IME is irrelevant, if they click the undo button, then what they just did should be undone. If IMEs can modify the DOM without the js knowing about it, then js has to do dom diffing to try and guess what just happened. And that sucks.

So the conclusion in Paris was that we need either:
a - low level events for everything an IME might want to do, letting the js react to these

b - the ability, during the composition event to let js move the (collapsed) selection to some arbitrary place, letting the IME do anything it wants on the DOM there, and atomically inserting what it did back to the original place when the composition end event fires.

(a), as you say, is crazy hard work that we can't expect to do in the short term. Eventually we should do it, and that's what ce=event should rely on to make IMEs work. But at the ce=typing level, (b) seemed to solve the problem.

Except that it is now being raised that maybe we can't do that either, due (if I understand correctly) to IMEs possibly needing to mess with the DOM to insert rich text.


 - Florian

Received on Monday, 12 October 2015 15:19:27 UTC