Which event fires when something dragged onto an input?

61 Views Asked by At

I have a text input.

I drag the URL from a browser window into the text field. (Click hold on the URL bar, drag, let go of click in the text field).

Which event fires in this case? Listening on paste ain't doing it. Is this the same for every browser?

2

There are 2 best solutions below

2
Tim Down On BEST ANSWER

You will get an HTML5 input event in all browsers except IE<9, in which you can use the propertychange event instead.

5
Manse On

paste is the event that should work - what browser ?

http://www.quirksmode.org/dom/events/cutcopypaste.html

Example : http://jsfiddle.net/VdUqx/1/ <- works for me in Chrome