开发者

jquery UI draggable/sortable and HTML5 content editable attribute

When I use JQue开发者_如何转开发ry 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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜