3

When I use JQuery UI's draggable/sortable feature at the parent element....and when applying contenteditable attribute at the child item....the selection feature doesn't works....

<div id="parent">
<div id="child" contenteditable></div>
</div>

$('#parent').draggable();

i.e. focus or active features do not work....without the dragging/sorting features of jQuery UI...focus and active features works at content editable applied element.....

OK.....I found the solution here: How can I enable 'draggable' on a element with contentEditable?

But the problem is: when calling the focus() method inside click-event...it brings cursor at the begging of focused element....it should be at the end...for typing something cursor should go to end...Is there any way to call focus() method and tell him that place cursor at the end of focused element?

Community
  • 1
  • 1
Muaz Khan
  • 7,138
  • 9
  • 41
  • 77
  • Have you checked out this library? HTML5 Sortable [http://farhadi.ir/projects/html5sortable/](http://farhadi.ir/projects/html5sortable/) [https://github.com/farhadi/html5sortable](https://github.com/farhadi/html5sortable) – Tyson Nero Sep 13 '12 at 19:54
  • Sir, contenteditable changes the DOM element --- it affects the events attached to that DOM element --- Thanks for providing such a nice link. – Muaz Khan Sep 14 '12 at 01:47
  • This solution work for me http://stackoverflow.com/a/6603190/1115817 – OammieR Jan 08 '13 at 03:02

0 Answers0