We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8174ecc commit 0c9f282Copy full SHA for 0c9f282
src/range-container.js
@@ -15,7 +15,10 @@ export default class RangeContainer {
15
this.host = editableHost && editableHost.jquery
16
? editableHost[0]
17
: editableHost
18
- this.range = range
+ // 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()
22
this.isAnythingSelected = (range !== undefined)
23
this.isCursor = (this.isAnythingSelected && range.collapsed)
24
this.isSelection = (this.isAnythingSelected && !this.isCursor)
0 commit comments