Bug 43689 - Drag and drop text into input field with placeholder inserts text into placeholder
Summary: Drag and drop text into input field with placeholder inserts text into placeh...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-08 09:08 PDT by Tim
Modified: 2011-12-05 22:09 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim 2010-08-08 09:08:06 PDT
If you copy text, click on a input field with a placeholder and then paste, the placeholder text is replaced as expected. 

However if text is selected from somewhere else and dragged into an input text field over the placeholder text, the dragged text is "inserted" into the placeholder text and the entire string is now content in the form. 

For example if 'abc' is selected text, and it is dragged into a input form text field with the placeholder "Enter text here", with the "drop" (mouseup=end of drag) occurring in between the x and t in "text" then the form field now reads "Enter texabct here" instead of expected "abc". The placeholder text goes from greyed out to black and is now part of the "input".
Comment 1 Alexey Proskuryakov 2010-08-09 00:04:48 PDT
I don't see this behavior on front page of www.apple.com with Safari 5.0.1. What are the sites where you observe this, and with which versions of Safari and WebKit?
Comment 2 Tim 2010-08-09 05:27:18 PDT
This fails in Safari 5.0.1 (6533.17.8) and Version 5.0.1 (6533.17.8, r64889) webkit.

I have made a hopefully small example:

<form action='/none' method='post'>
<textarea placeholder='Enter text here' name='t' ></textarea>
<textarea name='t' >ABC</textarea>
<br><br>Select the ABC and drag it from the second form field to the first form field over the "Enter text here" in the textarea. When dropped it will be inserted into the placeholder.
</form>

This example is at 

https://www.schellingpoint.com/wbb

Hope this helps.

Tim
Comment 3 Alexey Proskuryakov 2010-08-09 05:34:23 PDT
I can reproduce with this example.
Comment 4 Kent Tamura 2011-12-05 22:09:22 PST
It seems this was fixed.