How to detect drag and drop inside an input?
I have an input field that looks like this:
<input id="test" value="abdefg" />
I would like the jQuery event to detect that I am dragging text inside an input field. With drag and drop, I mean that you first select ab and drag this selection so that it ends after g.
Is it possible to detect such things?
I do not know of any specific event that fires when dragging text. But it should be possible just to save the field value in mousedown, and then compare it with the new field value when the mouseup event fires. If the value has changed, something has been dragged.
Or am I missing something?
, oninput.
, oninput IE8 , onpropertychange. , - http://whattheheadsaid.com/projects/input-special-event.