Open f-prime opened 4 years ago
That is indeed odd
[CW: stylized text]
𝓟𝓪𝓼𝓽𝓲𝓷𝓰 𝓲𝓷𝓽𝓸 𝓖𝓲𝓽𝓗𝓾𝓫 𝓱𝓪𝓼 𝓷𝓸 𝓼𝓾𝓬𝓱 𝓲𝓼𝓼𝓾𝓮
Pasting into Twitter, copying what is there, refreshing and then pasting again results in non-stylized text without weirdness. I'm guessing twitter has a script doing strange things to the input field, and it gets very confused when Destylize changes it up
I wonder if it's even a good idea to destylize text in the input fields. Seems like it applies more to content other people have published. So it could be solved by just ignoring input fields all together.
I already explicitly ignore input fields (that's why pasting into GH is fine). I've now checked, and Twitter seems to be rolling its own text composition element. I believe the appropriate solution would be to blacklist the compose tweet area on twitter.com.
Bug
Pasting stylized text while destylize is enabled breaks delete/backspace functionality. I noticed this when I went to paste unicode cursive text into Twitter. It got destylized, but when I went to edit the destylized text (deleting characters) the cursor would get pushed to the beginning of the sentence and the characters that would get deleted would be in the middle of the sentence.
How to recreate
I used Cursive Text Generator (https://lingojam.com/CursiveTextGenerator) to generate the stylized text
Went to twitter and created a new tweet
Pasted stylized text from Cursive Text Generator with destylize enabled
Tried to edit the destylized characters