Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

July 29th F2F Agenda Item - Clipboard events #135

Closed
gked opened this issue Jul 29, 2016 · 2 comments
Closed

July 29th F2F Agenda Item - Clipboard events #135

gked opened this issue Jul 29, 2016 · 2 comments

Comments

@gked
Copy link

gked commented Jul 29, 2016

Should paste and cut have beforeInput events? If so, should these be cancelable? Only in cE=events or also in cE=true?
Should copy also have a beforeInput event? What if there is no editing host involved?

@gked
Copy link
Author

gked commented Jul 29, 2016

Resolution:
Should paste and cut have beforeInput events? Yes.
Should copy also have a beforeInput event? No
If so, should these be cancelable? Yes.
Only in cE=events or also in cE=true? It will apply to CE=true and CE=plaintext-only.
What if there is no editing host involved? No, since we are tying beforeInput event to Input event, and input events are only firing in editable regions.

@garykac
Copy link
Member

garykac commented Aug 1, 2016

Decision: Keep cut/copy/paste around

  • They already ship, so there is code that depends on them
  • Beforeinput doesn't handle the 'copy' case, and having 'copy' without 'cut' and 'paste' feels odd

Event order:

  • beforeinput
  • cut (or paste)
  • input

No beforeinput/input for copy events

What about Cancelable? (for contentEditable != false)

  • canceling beforeinput (type=cut/paste):
    • prevents the cut/paste event
    • prevents dom update
    • prevents clipboard update
  • canceling cut/paste:
    • prevents dom update
    • prevents clipboard update

Investigate where spec says paste events are not cancelable: Editing Spec 6.2 bullet point 6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants