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 - Dragging and dropping #24

Open
johanneswilm opened this issue Aug 25, 2016 · 8 comments
Open

July 29th F2F Agenda Item - Dragging and dropping #24

johanneswilm opened this issue Aug 25, 2016 · 8 comments
Assignees

Comments

@johanneswilm
Copy link
Contributor

From @gked on July 29, 2016 19:42

What should the order of the events be and in what spec should this be placed?

Copied from original issue: w3c/editing#134

@johanneswilm
Copy link
Contributor Author

From @gked on July 29, 2016 19:42

Resolution: In what order do dragend, input and drop events are fired and when is dom updated during those events in Edge. Then we can come to real resolution.

@johanneswilm
Copy link
Contributor Author

From @garykac on August 1, 2016 20:44

Current order for Cr, FF, Safari is:

  • drop
  • (beforeinput should go here)
  • update DOM
  • input
  • dragend

Need to verify with Edge and confirm.

@johanneswilm
Copy link
Contributor Author

From @garykac on August 1, 2016 20:44

Spec also says something about updating the DOM on dragend if dragging selected text. Need to investigate and see what the browsers currently do. dragend may need to generate beforeinput/input events as well.

@johanneswilm
Copy link
Contributor Author

From @gked on August 2, 2016 1:4

Edge has bugs in this area. Event sequence it fires is different from the rest:

  • drop
  • dragend
  • partial DOM update ( img element is being inserted after foo but not being removed before foo)
  • dragend
  • input
    -DOM update

We'll fix the issue on our side as the behavior of the rest of the browsers makes sense.

To Gary's second comment, Edge does update the DOM after dragend is being fired but for images. This is probably why Edge tries to update the DOM once dragend is fired.

@johanneswilm
Copy link
Contributor Author

@garykac I cannot see what we decided on where the event order for drag/drop should be specified. Could this go into UI events?

@chong-z
Copy link
Contributor

chong-z commented Sep 15, 2016

#19 Introduced InputType deleteByDrag and insertFromDrop, but

  1. What's the event order for these two?
  2. Do we have any technique difficulty on making sure a single undo will undo both?

Possible Orders
a) Sequential (or swap deleteByDrag and insertFromDrop)

  • drop
  • beforeinput deleteByDrag
  • update DOM
  • input deleteByDrag
  • beforeinput insertFromDrop
  • update DOM
  • input insertFromDrop
  • input
  • dragend

b) Nested

  • drop
  • beforeinput deleteByDrag
  • beforeinput insertFromDrop
  • update DOM
  • input deleteByDrag
  • input insertFromDrop
  • input
  • dragend

Probably a)?

@chong-z
Copy link
Contributor

chong-z commented Sep 23, 2016

RESOLUTION: Event order for deleteByDrag and insertFromDrop should be sequential (a), and only requires a single undo.
https://www.w3.org/2016/09/22-webapps-minutes.html#resolution08

@johanneswilm
Copy link
Contributor Author

Right - but the undo applies to undo in Javascript and there will be a note for that. What you do browserwise in terms of undo does not matter to anyone, as the global browser's undo stack is unusable in any editor that does even the slightest modification to raw contenteditable.

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