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

[beforeinput] Rename drag&drop to deleteByDrag&insertFromDrop #19

Closed
johanneswilm opened this issue Aug 25, 2016 · 3 comments
Closed

[beforeinput] Rename drag&drop to deleteByDrag&insertFromDrop #19

johanneswilm opened this issue Aug 25, 2016 · 3 comments

Comments

@johanneswilm
Copy link
Contributor

From @choniong on August 24, 2016 15:17

We should use the name deleteByDrag&insertFromDrop to make it clear that the event is only for DOM modification. (e.g. Preventing deleteByDrag won't stop the drag&drop process)

Background:
Assume we all agree that InputEvent should only focus on DOM modification w3c/editing#144 (comment), and we are renaming cut&paste to deleteByCut&insertFromPaste.

Copied from original issue: w3c/editing#147

@johanneswilm
Copy link
Contributor Author

Right. What about the dataTransfer object? Should we keep that? In some ways it seems to be similar to clipboard operations.

@johanneswilm
Copy link
Contributor Author

From @choniong on August 24, 2016 15:58

I would imagine we could have:

  1. dataTransfer=NULL for both deleteByDrag and deleteByCut, and
  2. dataTransfer=|data to insert| for insertFromDrop and insertFromPaste.

Does that sounds reasonable?

But for 2., should dataTransfer be the

  1. Raw data from clipboard/drag, or
  2. The fragment to be put on DOM?

e.g. The raw data could be <meta charset='utf-8'><h1 style="........">header</h1>, but the fragment being actually inserted could be just <h1>header</h1>.

I would vote for 1. Raw data since JS could put their own stuff, but this might not be consistence with beforeinput's definition?

@johanneswilm
Copy link
Contributor Author

Hey, yes, it definitely needs to be 1 as the JS may decide to do something completely different with it and it should have access to the most "original" version of the data available.

Did you guys come to a conclusion on whether or not we can create both the dragend- and drop-based beforeinput events? If I recall correctly the plan was for the Chrome team to check their source code on whether it's viable to have both events.

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

1 participant