Search code examples
javascriptdom-eventsrich-internet-application

Which event fires when something dragged onto an input?


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?


Solution

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