rugk/mastodon-simplified-federation

Hitting the Return key causes the Mastodon accounr settings to clear (reloading the setting)

ELLIOTTCABLE opened this issue · 2 comments

Bug description

When attempting to enter my account in the settings, the yellow message disappears, which implies something has worked:

Screenshot 2023-05-23 at 12 01 11

However, hitting the Return key causes the field to clear — so does reloading the settings.

I can't seem to find a way to actually set, and save, my username. 😅

System

Operating system and version: macOS Ventura 13.4
Browser and version: Firefox 113.0.1
Add-on version: 2.0

rugk commented

Hi and thanks for your report.

I guess the important point is this:

However, hitting the Return key causes the field to clear — so does reloading the settings.

Because actually, you do not need to hit enter in any way. It automatically saves all settings, so if there is no error you can expect it works.

I tried to reproduce this issue on Linux (GNOME) and when I hit enter things just flash a bit, but the setting stays there.
However, this could be related to that you use macOS… maybe you have the "Reset all settings button" button focused all the time/enter causes it to be triggered, even though you are editing a completely different field?

In any case that behavior is of course not wanted, but I guess I need people with macOS experience/who can test this to have a reliable fix.

rugk commented

Technical note: The reset button HTML code is here and it type="button", not type="submit" (which it would also be when you leave that out given crazy HTML defaults 🙃), so actually it should not be triggered:

https://github.com/rugk/mastodon-simplified-federation/blob/2e320d4ca3140808ec684cff0160732ac25f2f69/src/options/options.html#LL93C4-L93C4