I am using the following code to attempt to select text with TextRange objects in a WebView.If the text I'm trying to select is within a single element it works fine. If the coordinates specified by the start/end TextRanges span multiple elements, I get an "Unspecified Error". Am I misunderstanding the use of TextRanges? Are we not allowed to select across elements?
var start = document.body.createTextRange(); start.moveToPoint(20, 20); var end = document.body.createTextRange(); end.moveToPoint(20, 100); start.setEndPoint("EndToEnd", end); start.select();