diff --git a/public/scripts/browser-fixes.js b/public/scripts/browser-fixes.js index 322926171..96eaa7402 100644 --- a/public/scripts/browser-fixes.js +++ b/public/scripts/browser-fixes.js @@ -7,8 +7,7 @@ function sanitizeInlineQuotationOnCopy() { // To work around this, take the selection and transform to before calling toString(). document.addEventListener('copy', function (event) { const selection = window.getSelection(); - if (selection.anchorNode.nodeName !== '#text' || selection.focusNode.nodeName !== '#text' || !selection.anchorNode?.parentElement.closest('.mes_text')) { - // Complex selection, skip. + if (!selection.anchorNode?.parentElement.closest('.mes_text')) { return; }