This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Ryosuke, can you advise regarding what should be done about the red text here?: http://www.whatwg.org/specs/web-apps/current-work/complete.html#initiate-the-drag-and-drop-operation How do I adjust the text to work with your new model?
So I think in step 4.1.3. where it says "Insert the actual data of the first item in the drag data store item list to have a drag data item type string of "text/plain" and a drag data item kind that is Plain Unicode string into the text field or editing host or editable element in a manner consistent with platform-specific conventions (e.g. inserting it at the current mouse cursor position, or inserting it at the end of the field)." The insertion should be implemented as automatic transaction, and the UA should fire transaction event at the end of the insertion as specified in my working draft.
It's more than that, though. Literally every DOM manipulation done to the document between the start of the drag and drop operation and the end of it ends up in the browser's undo transaction history, at least in IE. that is whether it was done by script, or indeed anything else.
(In reply to comment #3) > It's more than that, though. Literally every DOM manipulation done to the > document between the start of the drag and drop operation and the end of it > ends up in the browser's undo transaction history, at least in IE. that is > whether it was done by script, or indeed anything else. I see. I wasn't aware of that. I'll have to look into IE's and other browser's behavior fist. When you say every DOM manipulation, does that include those done by scripts as well?
Yeah. The only ones that can be done that I can think of actually are scripted DOM manipulations, and DOM manipulations that are a direct result of the drag/drop operation's events' default actions.
(In reply to comment #3) > It's more than that, though. Literally every DOM manipulation done to the > document between the start of the drag and drop operation and the end of it > ends up in the browser's undo transaction history, at least in IE. that is > whether it was done by script, or indeed anything else. I'm not observing this behavior. I've tried mutating DOM on dragstart, drop, etc... events but they don't appear to be included in IE's undo stack. The change I made just stays in the DOM. Could you elaboarate (perhaps a test case?) what you're observing? Or are you referring to the DOM changes made by IE itself?
As discussed on IRC, I think the mutations I tried were done in setTimeout(). Does that help? I'm not sure we want to be duplicating this though. It may be that that should be considered a bug.
I've removed the text in question from HTML altogether. Let me know if there's anything you need changed in the HTML spec with respect to tracking DOM changes for undo when they are done from a timeout during a drag-and-drop, and whether there's anything I need to do to make the actual user-effected changes during a drag-and-drop (e.g. the moving of a text selection in contenteditable="") actually result in the right undo transactions.
Checked in as WHATWG revision r6770. Check-in comment: drop the note about the implications of drag-and-drop on undo http://html5.org/tools/web-apps-tracker?from=6769&to=6770
(In reply to comment #7) > As discussed on IRC, I think the mutations I tried were done in setTimeout(). > Does that help? Yeah, it appears that MSIE restores any DOM mutations done after dragstart event and immediately before drop event. > I'm not sure we want to be duplicating this though. It may be that that should > be considered a bug. It's possible that some contents depend on this behavior so I'll probably bring it up on public-webapps or contact someone at Microsoft before finalizing it.
Created attachment 1043 [details] test case Here's some test case I used.
This bug was cloned to create bug 17773 as part of operation convergence.
Ryosuke, you stopped working on undo manager, right? Given that, and given that the red text from comment 1 appears to be gone. Can I close this?
Yeah, I did when I left Google. However, I've been told that someone from Google is still interested in maintaining the spec. Try contacting slightlyoff?
I asked Alex, he said this stopped being developed when you left.