I am using the following code to get the position of a selected text :
var text = window.getSelection();
start = text.anchorOffset;
end = text.focusOffset - text.anchorOffset;
And I want to get that selected text later .. for that I am using :
document.elementFromPoint(start,end);
However, it always returns "null".
Help please :)