@iamakulov/codemirror-view 9999.99.99-fixcmdc.0 → 9999.99.99-fixcmdc.1
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/index.cjs +2 -5
- package/dist/index.js +2 -5
- package/ivan.justfile +5 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4992,17 +4992,14 @@ function copiedRange(state) {
|
|
|
4992
4992
|
}
|
|
4993
4993
|
let lastLinewiseCopy = null;
|
|
4994
4994
|
handlers.copy = handlers.cut = (view, event) => {
|
|
4995
|
-
// If the DOM selection
|
|
4995
|
+
// If the DOM selection is outside this editor, don't intercept.
|
|
4996
4996
|
// This happens when a parent editor (like ProseMirror) selects content that
|
|
4997
4997
|
// spans multiple elements including this CodeMirror. The copy event may
|
|
4998
4998
|
// bubble through CodeMirror (e.g. when CodeMirror is the first or the last
|
|
4999
4999
|
// element in the selection), but we should let the parent handle it.
|
|
5000
5000
|
let domSel = getSelection(view.root);
|
|
5001
|
-
if (domSel &&
|
|
5002
|
-
!view.contentDOM.contains(domSel.anchorNode) &&
|
|
5003
|
-
!view.contentDOM.contains(domSel.focusNode)) {
|
|
5001
|
+
if (domSel && !hasSelection(view.contentDOM, domSel))
|
|
5004
5002
|
return false;
|
|
5005
|
-
}
|
|
5006
5003
|
let { text, ranges, linewise } = copiedRange(view.state);
|
|
5007
5004
|
if (!text && !linewise)
|
|
5008
5005
|
return false;
|
package/dist/index.js
CHANGED
|
@@ -4988,17 +4988,14 @@ function copiedRange(state) {
|
|
|
4988
4988
|
}
|
|
4989
4989
|
let lastLinewiseCopy = null;
|
|
4990
4990
|
handlers.copy = handlers.cut = (view, event) => {
|
|
4991
|
-
// If the DOM selection
|
|
4991
|
+
// If the DOM selection is outside this editor, don't intercept.
|
|
4992
4992
|
// This happens when a parent editor (like ProseMirror) selects content that
|
|
4993
4993
|
// spans multiple elements including this CodeMirror. The copy event may
|
|
4994
4994
|
// bubble through CodeMirror (e.g. when CodeMirror is the first or the last
|
|
4995
4995
|
// element in the selection), but we should let the parent handle it.
|
|
4996
4996
|
let domSel = getSelection(view.root);
|
|
4997
|
-
if (domSel &&
|
|
4998
|
-
!view.contentDOM.contains(domSel.anchorNode) &&
|
|
4999
|
-
!view.contentDOM.contains(domSel.focusNode)) {
|
|
4997
|
+
if (domSel && !hasSelection(view.contentDOM, domSel))
|
|
5000
4998
|
return false;
|
|
5001
|
-
}
|
|
5002
4999
|
let { text, ranges, linewise } = copiedRange(view.state);
|
|
5003
5000
|
if (!text && !linewise)
|
|
5004
5001
|
return false;
|
package/ivan.justfile
ADDED