drag a textarea when the cursor is inside the control
i am making a textarea draggable using jquery UI....basically im making a div draggable and in that div is my textare开发者_StackOverflow中文版a. when u drag the div the textarea drags too. the problem is that if my mouse pointer is inside the textarea, and i try to drag the control, it fails. so basically when the pointer changes the shape from arrow to that symbol when u are writting text( i dont know wats the name of the shape) the dragging donot occur! i think i can understand that since the text area is in editable mode, and when u click inside, the jquery drag method might not be invoked...but i think there shud be a solution to this!
thanks!!
The best way to easily get around this is to mimic a window UI component where the top side bar is the handle for the dragging and the content is not.
Refer to the corresponding section of jQuery UI for further information
If you don't need the textarea the you could simply mask it with another div, or set it to disabled. However, if you do need the textarea then you've got yourself a usability issue as you'd never be able to highlight text inside the textarea if you did manage to make it draggable.
精彩评论