Re: [w3c/uievents] Specify the textInput event (PR #362)

@masayuki-nakano requested changes on this pull request.



> @@ -2073,10 +2183,16 @@ Issue: Should these be moved into the Clipboard spec?
     1. Let |data| = the text on the clipboard being pasted
     1. Let |result| = <a>fire an InputEvent</a> with "beforeinput", "insertFromPaste" and |data|

How about `insertFromPasteAsQuotation`? It's currently supported only by Gecko.

>  
-       1. Paste clipboard contents into DOM target element
-       1. <a>Fire an InputEvent</a> with "input", "insertFromPaste" and |data|
+    1. Paste clipboard contents into DOM target element
+    1. <a>Fire an InputEvent</a> with "input", "insertFromPaste" and |data|
 
 </div><!-- algorithm -->

If `inputType` of `beforeinput` is `insertCompositionText` **and** the composition is being committed, `textInput` is fired with `data=beforeinput.data`. On Chrome, `isComposing` of `beforeinput` and `input` are `true`. Unfortunately, I think that there is no way to define this behavior with attributes of the event. See also <https://https://github.com/w3c/uievents/issues/202>.

>  
-       1. Paste clipboard contents into DOM target element
-       1. <a>Fire an InputEvent</a> with "input", "insertFromPaste" and |data|
+    1. Paste clipboard contents into DOM target element
+    1. <a>Fire an InputEvent</a> with "input", "insertFromPaste" and |data|
 
 </div><!-- algorithm -->

Odd, in the case of DnD, Chrome dispatches `textInput` immediately after `drop`, but before `beforeinput` whose `inputType` is (`deleteByDrag` and) `insertFromDrop`. Additionally, the event target of `textInput` is not the editing host.

I think that Gecko cannot emulate this behavior.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/pull/362#pullrequestreview-1831116231
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/uievents/pull/362/review/1831116231@github.com>

Received on Friday, 19 January 2024 02:46:28 UTC