mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
3f6dead134
The first node of |iter| in Selection::SelectFrames() may be different from the start parent of given range. Therefore, if they are different, it shouldn't skip first item of |iter|. MozReview-Commit-ID: DgE2dSziaxo --HG-- extra : rebase_source : b35f52d194bf437cc79d1917ad497ebb1a8c27f0
15 lines
320 B
HTML
15 lines
320 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<body>
|
|
<p id="first">f<span>o</span>o</p>
|
|
<p id="second">bar</p>
|
|
<script>
|
|
var p1 = document.getElementById("first");
|
|
var p2 = document.getElementById("second");
|
|
var selection = window.getSelection();
|
|
selection.setBaseAndExtent(p1.firstChild, 0, p2.firstChild, 2);
|
|
</script>
|
|
</body>
|
|
</html>
|