mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-03 03:17:54 +01:00
Remove textnode checks before applying firefox double double qutoes fix
This commit is contained in:
parent
f897a4ab1a
commit
82570ef31d
@ -7,8 +7,7 @@ function sanitizeInlineQuotationOnCopy() {
|
|||||||
// To work around this, take the selection and transform <q> to <span> before calling toString().
|
// To work around this, take the selection and transform <q> to <span> before calling toString().
|
||||||
document.addEventListener('copy', function (event) {
|
document.addEventListener('copy', function (event) {
|
||||||
const selection = window.getSelection();
|
const selection = window.getSelection();
|
||||||
if (selection.anchorNode.nodeName !== '#text' || selection.focusNode.nodeName !== '#text' || !selection.anchorNode?.parentElement.closest('.mes_text')) {
|
if (!selection.anchorNode?.parentElement.closest('.mes_text')) {
|
||||||
// Complex selection, skip.
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user