ractivejs / Ractive-decorators-sortable

Drag and drop items to sort them
http://ractivejs.github.io/Ractive-decorators-sortable/
MIT License
15 stars 21 forks source link

Input boxes inside sortable always get focus at beginning of input box #5

Open ghost opened 10 years ago

ghost commented 10 years ago

After enabling sortable I am unable to modify the default value for input boxes

What happens is that the cursor gets focus at the beginning of the value for an input box. So if there is a value defined in the template, then I cannot edit it!

Example:

ul {{#datalist}} li class="itemwrap" decorator="sortable" div class="content_item_entry" div class="item_entry_grip" i class="fa fa-bars text-muted" /i /div div class="item_details_container" input class="item_entry_section" value="{{title}}"/ /li {{/datalist}} /ul

The input's default value cannot be edited.

Thanks,

ghost commented 10 years ago

It seems like the keyboard left and right arrows work, however the mouse doesn't... Investigating....

zaus commented 8 years ago

You can double-click the text, or CTRL+A, but the drag event has been hijacked by the plugin...

zaus commented 8 years ago

I think it's https://github.com/ractivejs/Ractive-decorators-sortable/blob/master/src/Ractive-decorators-sortable.js#L109

Or maybe http://stackoverflow.com/questions/21680363/prevent-drag-event-to-interfere-with-input-elements-in-firefox-using-html5-drag

zaus commented 8 years ago

Ah, it's unfixable? http://www.quirksmode.org/blog/archives/2009/09/the_html5_drag.html#c12546