Imagine a situation, I've a text, once user clicks this text it is transformed into an input with same text which user clicked as a value.
I'm wondering if it is possible to make cursor appear exactly where click happened in the first place?
In this example, user first clicks to activate editing, and than he needs to click again where he wants cursor to appear.
$(document).on("click", ".click li.editable", function(){
//
var item = $(this);
item.removeClass("editable");
var word = item.html();
item.empty();
item.append('<input class="quick-edit" type="text" name="quick_edit" value="'+ word +'" />');
$(".quick-edit").focus();
//
});