OctoNezd / oldlander

WebExt for to make old reddit more usable on phone
MIT License
143 stars 6 forks source link

Enter/newline key does not register a newline in comments #127

Closed ketura closed 7 months ago

ketura commented 7 months ago

In Firefox beta on android, attempting to press the enter/newline key results in a space upon first press and no whitespace at all on subsequent presses. This makes writing comments a drag, as you are limited to a single paragraph. Even copy-pasting text with newlines appears to have them removed.

Each newline press does result in a character being added (which you can tell by pressing backspace). Suspect perhaps a CSS thing.

To Reproduce 1- open any thread 2- attempt to leave a comment. Use the enter key or paste in material with multiple newlines 3- observe that the text box has ignored all newline input

Expected behavior Newlines should behave as they do in every text app ever.

Screenshots Screenshot_2024-03-22-13-25-38-66_ffb2f5e1b976ff98cfc94f359fbce8de

Smartphone (please complete the following information):

OctoNezd commented 7 months ago

Can confirm on latest OL build on latest f-droid Fennec, not present in normal reddit. Weird - I dont remember ever modifying input box behavior on reddit.

ketura commented 7 months ago

I just confirmed that the newlines are in fact preserved in the submitted message, they just don't look any different from spaces in the text box:

Screenshot_2024-03-22-14-00-55-81_ffb2f5e1b976ff98cfc94f359fbce8de

Screenshot_2024-03-22-14-01-14-90_ffb2f5e1b976ff98cfc94f359fbce8de

I am now more suspicious of it being a CSS thing that is perhaps crushing the vertical padding of <p> or <div> tags to 0. Some selector meant for one of the menu bars incorrectly matching something about the text box, or something.

OctoNezd commented 7 months ago

It's caused by white-space: unset on textarea. I dont remember why I put it there, gonna remove that.