@livingdocs/editable.js 5.0.4 → 5.0.6
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/range-container.js +4 -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.6",
|
|
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": "0c9f2822e9727cc03b715b7574cdf076bead4400",
|
|
84
|
+
"build": "1438",
|
|
85
85
|
"branch": "master",
|
|
86
86
|
"isPr": false,
|
|
87
87
|
"slug": "livingdocsIO/editable.js",
|
|
88
|
-
"date": "2024-01-
|
|
88
|
+
"date": "2024-01-31T09:15:54.845Z"
|
|
89
89
|
}
|
|
90
90
|
}
|
package/src/range-container.js
CHANGED
|
@@ -15,7 +15,10 @@ export default class RangeContainer {
|
|
|
15
15
|
this.host = editableHost && editableHost.jquery
|
|
16
16
|
? editableHost[0]
|
|
17
17
|
: editableHost
|
|
18
|
-
|
|
18
|
+
// Safari 17 seems to modify the range instance on the fly which breaks later comparisons.
|
|
19
|
+
// We clone the range at the time of the RangeContainer creation.
|
|
20
|
+
// https://developer.apple.com/documentation/safari-release-notes/safari-17-release-notes#New-Features
|
|
21
|
+
this.range = range?.cloneRange()
|
|
19
22
|
this.isAnythingSelected = (range !== undefined)
|
|
20
23
|
this.isCursor = (this.isAnythingSelected && range.collapsed)
|
|
21
24
|
this.isSelection = (this.isAnythingSelected && !this.isCursor)
|