@livingdocs/editable.js 5.0.3 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editable.js +1 -1
- package/dist/editable.js.map +1 -1
- package/package.json +4 -4
- package/src/selection-watcher.js +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livingdocs/editable.js",
|
|
3
3
|
"description": "Friendly contenteditable API",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.5",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@babel/runtime": "^7.16.7",
|
|
7
7
|
"lodash-es": "^4.17.21"
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"isCi": true,
|
|
81
81
|
"name": "Drone",
|
|
82
82
|
"service": "drone",
|
|
83
|
-
"commit": "
|
|
84
|
-
"build": "
|
|
83
|
+
"commit": "8b5fa7dd4690e93197af155928d9124592068a17",
|
|
84
|
+
"build": "1422",
|
|
85
85
|
"branch": "master",
|
|
86
86
|
"isPr": false,
|
|
87
87
|
"slug": "livingdocsIO/editable.js",
|
|
88
|
-
"date": "2024-01-
|
|
88
|
+
"date": "2024-01-23T16:45:52.105Z"
|
|
89
89
|
}
|
|
90
90
|
}
|
package/src/selection-watcher.js
CHANGED
|
@@ -46,7 +46,7 @@ export default class SelectionWatcher {
|
|
|
46
46
|
// rangeCount is 0 or 1 in all browsers except firefox
|
|
47
47
|
// firefox can work with multiple ranges
|
|
48
48
|
// (on a mac hold down the command key to select multiple ranges)
|
|
49
|
-
if (this.selection
|
|
49
|
+
if (this.selection?.rangeCount && successfulSync) {
|
|
50
50
|
const range = this.selection.getRangeAt(0)
|
|
51
51
|
const hostNode = parser.getHost(range.commonAncestorContainer)
|
|
52
52
|
if (hostNode) return new RangeContainer(hostNode, range)
|