<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>8117</bug_id>
          
          <creation_ts>2006-03-31 23:14:32 -0800</creation_ts>
          <short_desc>REGRESSION (NativeTextField): Drag and drop text within a text input field modifies page</short_desc>
          <delta_ts>2006-04-03 16:55:49 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://google.com/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="PCheese">mulletsailors</reporter>
          <assigned_to name="Justin Garcia">justin.garcia</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>38147</commentid>
    <comment_count>0</comment_count>
    <who name="PCheese">mulletsailors</who>
    <bug_when>2006-03-31 23:14:32 -0800</bug_when>
    <thetext>WebKit on Mac OS X 10.4.5 using the 31 March 2006 nightly.

Dragging and dropping text repeatedly within a text input field modifies the page contents.

Steps to reproduce:

Access http://www.google.com/
Enter javascript:alert(document.body.childNodes.length); into the location bar and note the number of child nodes.
Type a query into the search field (say, &quot;Safari WebKit&quot;)
Select a portion of the text field contents (say, &quot;Saf&quot;), then move it elsewhere within the text field.
Without deselecting the text that has been moved, move it once more to a different location.
Notice that portions of the query appear at the bottom of the page contents.  Verify that the page contents have changed by running javascript:alert(document.body.childNodes.length); again</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38276</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-04-02 09:42:54 -0700</bug_when>
    <thetext>Same problem with normal contenteditable divs.

=================
ASSERTION FAILED: editableRoot (/Users/ap/WebKit/WebCore/editing/ReplaceSelectionCommand.cpp:124 WebCore::ReplacementFragment::ReplacementFragment(WebCore::Document*, WebCore::DocumentFragment*, bool))
=================
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38331</commentid>
    <comment_count>2</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2006-04-02 22:40:22 -0700</bug_when>
    <thetext>Ah, when a ReplaceSelectionCommand is a sub-command (which is what happens during a drag), frame-&gt;selection() may be different than the endingSelection.  The ReplacementFragment will need to either be given the endingSelection or a pointer back to the ReplaceSelectionCommand so it can get the endingSelection.  

We should get rid of the endingSelection, it&apos;s confusing.  An operation should just set its selection on the frame, but through a special setter that doesn&apos;t send selection change notifications (those should only be sent for user-level selection changes).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38359</commentid>
    <comment_count>3</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2006-04-02 23:25:43 -0700</bug_when>
    <thetext>These are all text field regressions so they should all be P1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38403</commentid>
    <comment_count>4</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2006-04-03 10:58:29 -0700</bug_when>
    <thetext>This happens in any empty contenteditable div at the end of the document, it looks like a regression from r13628 (setting mergeStart to true for empty editable regions to fix Undo).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>