w3c / input-events

Input Events
https://w3c.github.io/input-events/
Other
24 stars 16 forks source link

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

Open johanneswilm opened 8 years ago

johanneswilm commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

From @garykac on August 1, 2016 20:44

Current order for Cr, FF, Safari is:

Need to verify with Edge and confirm.

johanneswilm commented 8 years ago

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 commented 8 years ago

From @gked on August 2, 2016 1:4

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

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 commented 8 years ago

@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 commented 8 years ago

https://github.com/w3c/input-events/issues/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)

b) Nested

Probably a)?

chong-z commented 8 years ago

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 commented 8 years ago

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.