prosemirror-view 1.28.1 → 1.28.2
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +6 -1
- package/dist/index.js +8 -2
- package/package.json +1 -1
- package/src/viewdesc.ts +6 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1102,7 +1102,12 @@ var ViewDesc = function () {
|
|
|
1102
1102
|
domSel.collapse(anchorDOM.node, anchorDOM.offset);
|
|
1103
1103
|
|
|
1104
1104
|
try {
|
|
1105
|
-
if (anchor != head)
|
|
1105
|
+
if (anchor != head) {
|
|
1106
|
+
try {
|
|
1107
|
+
domSel.extend(headDOM.node, headDOM.offset);
|
|
1108
|
+
} catch (_) {}
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1106
1111
|
domSelExtended = true;
|
|
1107
1112
|
} catch (err) {
|
|
1108
1113
|
if (!(err instanceof DOMException)) throw err;
|
package/dist/index.js
CHANGED
|
@@ -957,8 +957,14 @@ class ViewDesc {
|
|
|
957
957
|
if ((domSel.extend || anchor == head) && !brKludge) {
|
|
958
958
|
domSel.collapse(anchorDOM.node, anchorDOM.offset);
|
|
959
959
|
try {
|
|
960
|
-
if (anchor != head)
|
|
961
|
-
|
|
960
|
+
if (anchor != head) {
|
|
961
|
+
// This can crash on Safari if the editor is hidden, and
|
|
962
|
+
// there was no selection. (#1308)
|
|
963
|
+
try {
|
|
964
|
+
domSel.extend(headDOM.node, headDOM.offset);
|
|
965
|
+
}
|
|
966
|
+
catch (_) { }
|
|
967
|
+
}
|
|
962
968
|
domSelExtended = true;
|
|
963
969
|
}
|
|
964
970
|
catch (err) {
|
package/package.json
CHANGED
package/src/viewdesc.ts
CHANGED
|
@@ -419,7 +419,12 @@ export class ViewDesc {
|
|
|
419
419
|
if ((domSel.extend || anchor == head) && !brKludge) {
|
|
420
420
|
domSel.collapse(anchorDOM.node, anchorDOM.offset)
|
|
421
421
|
try {
|
|
422
|
-
if (anchor != head)
|
|
422
|
+
if (anchor != head) {
|
|
423
|
+
// This can crash on Safari if the editor is hidden, and
|
|
424
|
+
// there was no selection. (#1308)
|
|
425
|
+
try { domSel.extend(headDOM.node, headDOM.offset) }
|
|
426
|
+
catch (_) {}
|
|
427
|
+
}
|
|
423
428
|
domSelExtended = true
|
|
424
429
|
} catch (err) {
|
|
425
430
|
// In some cases with Chrome the selection is empty after calling
|