{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/editing/issues/144","repository_url":"https://api.github.com/repos/w3c/editing","labels_url":"https://api.github.com/repos/w3c/editing/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/w3c/editing/issues/144/comments","events_url":"https://api.github.com/repos/w3c/editing/issues/144/events","html_url":"https://github.com/w3c/editing/issues/144","id":171510435,"number":144,"title":"[beforeinput] PreventDefault() on InputType=cut differs from Clipboard API","user":{"login":"choniong","id":2839070,"avatar_url":"https://avatars.githubusercontent.com/u/2839070?v=3","gravatar_id":"","url":"https://api.github.com/users/choniong","html_url":"https://github.com/choniong","followers_url":"https://api.github.com/users/choniong/followers","following_url":"https://api.github.com/users/choniong/following{/other_user}","gists_url":"https://api.github.com/users/choniong/gists{/gist_id}","starred_url":"https://api.github.com/users/choniong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choniong/subscriptions","organizations_url":"https://api.github.com/users/choniong/orgs","repos_url":"https://api.github.com/users/choniong/repos","events_url":"https://api.github.com/users/choniong/events{/privacy}","received_events_url":"https://api.github.com/users/choniong/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/editing/labels/InputEvents","name":"InputEvents","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-16T20:32:45Z","updated_at":"2016-08-17T22:09:59Z","closed_at":null,"body":"If I recall correctly the outcome from the F2F is:\r\n\r\n1. [`Cut` and `paste` are effectively the same as beforeinput](https://docs.google.com/document/d/1XxIEF0So-kMF5mcJ03Yj0zsYMFRHEgXw1fV1K5FOwuQ/edit#heading=h.l9vlzb1oc68r)\r\n2. [Canceling 'beforeinput' prevents clipboard update](https://github.com/w3c/editing/issues/135#issuecomment-236702797)\r\n\r\nBut 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.\r\n\r\nTo solve the conflicts the possible solutions are (For `InputType=cut`):\r\n\r\na. Set `'beforeinput'.dataTransfer=NULL`,  preventing default will prevent everything.\r\nb. `'beforeinput'` shares the same `DataTransfer` object with `Clipboard::Cut`, and does the same thing\r\nc. Set `'beforeinput'.dataTransfer=Readonly-Data-To-Be-Cut`, preventing default will prevent everything.\r\n\r\nPersonally I'd perfer a) since JS can always get data from selection, and we can add `dataTransfer` later if it's really useful."},"comment":{"url":"https://api.github.com/repos/w3c/editing/issues/comments/240564816","html_url":"https://github.com/w3c/editing/issues/144#issuecomment-240564816","issue_url":"https://api.github.com/repos/w3c/editing/issues/144","id":240564816,"user":{"login":"johanneswilm","id":595512,"avatar_url":"https://avatars.githubusercontent.com/u/595512?v=3","gravatar_id":"","url":"https://api.github.com/users/johanneswilm","html_url":"https://github.com/johanneswilm","followers_url":"https://api.github.com/users/johanneswilm/followers","following_url":"https://api.github.com/users/johanneswilm/following{/other_user}","gists_url":"https://api.github.com/users/johanneswilm/gists{/gist_id}","starred_url":"https://api.github.com/users/johanneswilm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanneswilm/subscriptions","organizations_url":"https://api.github.com/users/johanneswilm/orgs","repos_url":"https://api.github.com/users/johanneswilm/repos","events_url":"https://api.github.com/users/johanneswilm/events{/privacy}","received_events_url":"https://api.github.com/users/johanneswilm/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T22:09:59Z","updated_at":"2016-08-17T22:09:59Z","body":"This looks interesting. The only thing is, if I understood you correct yesterday, preventDefaulting ```cut``` doesn't really prevent it from adding things to the clipboard, according to the spec. Correct?"}}
{"actor":{"display_login":"johanneswilm"}}