selection-ranges
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -9,2 +9,10 @@ # Changelog | ||
## 1.2.3 | ||
* `FIX`: correctly set range on empty node | ||
## 1.2.2 | ||
* `FIX`: correctly set range post paragraphs (IE 11) | ||
## 1.2.1 | ||
@@ -11,0 +19,0 @@ |
12
index.js
@@ -309,6 +309,14 @@ 'use strict'; | ||
if (count <= start) { | ||
range.setStartAfter(el.lastChild); | ||
if (el.lastChild) { | ||
range.setStartAfter(el.lastChild); | ||
} else { | ||
range.setStart(el, 0); | ||
} | ||
} | ||
range.setEndAfter(el.lastChild); | ||
if (el.lastChild) { | ||
range.setEndAfter(el.lastChild); | ||
} else { | ||
range.setEnd(el, 0); | ||
} | ||
@@ -315,0 +323,0 @@ return range; |
{ | ||
"name": "selection-ranges", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Selection range manipulation for contenteditable elements", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9194
262