| 6 | 6 | // STRG+C, STRG+V on firefox leads to duplicate double quotes when inline quotation elements are copied. |
| 7 | 7 | // To work around this, take the selection and transform <q> to <span> before calling toString(). |
| 8 | 8 | document.addEventListener('copy', function (event) { |
| 9 | + if (document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement) { |
| 10 | + return; |
| 11 | + } |
| 12 | + |
| 9 | 13 | const selection = window.getSelection(); |
| 10 | 14 | if (!selection.anchorNode?.parentElement.closest('.mes_text')) { |
| 11 | 15 | return; |