[w3c/editing] [beforeinput] PreventDefault() on InputType=cut differs from Clipboard API (#144)

If I recall correctly the outcome from the F2F is:

1. [`Cut` and `paste` are effectively the same as beforeinput](https://docs.google.com/document/d/1XxIEF0So-kMF5mcJ03Yj0zsYMFRHEgXw1fV1K5FOwuQ/edit#heading=h.l9vlzb1oc68r)
2. [Canceling 'beforeinput' prevents clipboard update](https://github.com/w3c/editing/issues/135#issuecomment-236702797)

But according to [Clipboard API](https://w3c.github.io/clipboard-apis/#the-cut-action) canceling `cut` does not prevents clipboard update. Instead it writes user-modified data into clipboard.

To solve the conflicts the possible solutions are (For `InputType=cut`):

a. Set `'beforeinput'.dataTransfer=NULL`,  preventing default will prevent everything.
b. `'beforeinput'` shares the same `DataTransfer` object with `Clipboard::Cut`, and does the same thing
c. Set `'beforeinput'.dataTransfer=Readonly-Data-To-Be-Cut`, preventing default will prevent everything.

Personally I'd perfer a) since JS can always get data from selection, and we can add `dataTransfer` later if it's really useful.

-- 
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/144

Received on Tuesday, 16 August 2016 20:33:40 UTC