[Webkit-unassigned] [Bug 111556] New: Improve drag&drop of list items in contentEditable divs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 6 04:09:24 PST 2013


           Summary: Improve drag&drop of list items in contentEditable
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: svillar at igalia.com

This bug comes from bug 110610 where I was trying to fix two issues at the same time, I think it's better to treat them separatedely.

This one is about some inconsistency when drag&drop list items in content editable divs. So in order to give it some more context, let's put some examples about how this currently works and the proposal behind this patch.

  * [ ] determine the selection
  * | position to drop the selection

Current WebKit for a single fully selected <li> does

1. alpha                    1. alpha
2. [beta]                   2.
3. gamma|  ===>    3. gammabeta
4. delta                    4. delta

while for some of them:

1. alpha                   1. alpha
2. [beta                   2.
3. gamma]  ===>    3. delta
4. delta|                  4. beta
                                5. gamma

The (technical) reason for that is that when creating the markup for the drag data, selections involving a single item or several do not work the same way because for the case of multiple items the node tree is traversed to create a markup with the same appearance than the original. With the changes I'm proposing both cases will work the same way. Thus the first case will behave like this:

1. alpha                    1. alpha
2. [beta]                   2.
3. gamma|  ===>    3. gamma
4. delta                    4. beta
                                5. delta

The empty list items actually contain a placeholder (<br>). In bug 110610 I'm proposing to remove them as well.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list