We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a124996 commit 0a80500Copy full SHA for 0a80500
lib/codeit.js
@@ -394,6 +394,10 @@ class CodeitElement extends HTMLElement {
394
395
cd.on('cut', (e) => {
396
397
+ const selection = window.getSelection();
398
+ if (!selection.rangeCount) return false;
399
+ selection.deleteFromDocument();
400
+
401
const text = window.getSelection().toString();
402
e.clipboardData.setData('text/plain', text);
403
e.preventDefault();
0 commit comments