contenteditable selection of text not working
问题 I am faced with following: when I try to select text in a contenteditable element and the end of the selection is the start of the element content, then no select event is fired and there are no Selection and Range objects. Could somebody please give me any advice on why this might occur or how I can prevent this? Code responsible for getting selection range: $('div[contenteditable="true"]').bind("mouseup keyup touchend", function() { lastCaretIndex = getSelectionRange(); }); function