wmww / destylize

Browser extension to remove unicode text stylization, Now available for Firefox and Chrome (see below)
MIT License
10 stars 3 forks source link

Compose tweet box on Twitter gets destylized and confused #7

Open f-prime opened 4 years ago

f-prime commented 4 years ago

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

  1. I used Cursive Text Generator (https://lingojam.com/CursiveTextGenerator) to generate the stylized text

  2. Went to twitter and created a new tweet

  3. Pasted stylized text from Cursive Text Generator with destylize enabled

  4. Tried to edit the destylized characters

wmww commented 4 years ago

That is indeed odd

wmww commented 4 years ago

[CW: stylized text]

𝓟𝓪𝓼𝓽𝓲𝓷𝓰 𝓲𝓷𝓽𝓸 𝓖𝓲𝓽𝓗𝓾𝓫 𝓱𝓪𝓼 𝓷𝓸 𝓼𝓾𝓬𝓱 𝓲𝓼𝓼𝓾𝓮

wmww commented 4 years ago

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

f-prime commented 4 years ago

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.

wmww commented 4 years ago

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.