How to enable positioning in a text box (via mouseclick) when the parent element is dragged

Ref. http://jsfiddle.net/a4LJv/2/

In IE / Firefox, the parent drag-and-drop attribute of true prevents the text box from being manually positioned with mouse clicks (keyboard arrows work fine). Chrome does not exhibit this behavior. I am curious if former browsers have the correct implementation or is this an unexpected behavior. Also, my current workaround is to disable the draggable attribute on mousedown and enable it again on mouseup .

+6
source share
1 answer

The second way is to remove the drag event directly from textarea as follows:

 $('textarea').on('dragstart', function(event){ event.preventDefault(); }); 

doesn't have IE for testing, but it works for FF.

0
source

All Articles