[w3c/editing] What should happen when insertFromComposition is canceled. (#152)

When `inputFromComposition` is canceled, we can't continue to have the text being composited since UA doesn't have the capability to keep input methods and keyboards open in some platforms. i.e. we need to remove the currently composting text from DOM.

There are two behaviors we can implement:
 1. Fire another `insertCompositionText` to replace the composition with an empty string when `inputFromComposition` is canceled.
 2. Before firing `inputFromComposition`, fire another `inputFromComposition` to replace the composition text with an empty string just like we do in `deleteByComposition` before starting composition.

(1) is weird because it would mean that we would fire an extra composition event after the composition had logically ended.

(2) makes sense because we already delete the existing content with `deleteByComposition` before entering input methods in reconversion case. We're simply following the same pattern when we're exiting the composition by first emptying the composing text, and then inserting the confirmed text.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/152

Received on Tuesday, 18 October 2016 01:30:55 UTC