audiobookshelf/client/components
Lars Kiesow 59ad1e5e36
Toggle switch shouldn't submit form
This patch fixes the problem that toggling one of the options in the
user account dialog will automatically submit the form.

The problem got introduced as a combination of the recent accessibility
fixes where some elements got turned into HTML button elements to make
them keyboard accessible. Doing that, I did not realize that the default
type of a button is `submit` [1]. This causes no problems at most places,
but will cause problem within a form (e.g. the user account settings)
where toggling an option is now identical to clicking submit.

This patch fixes the issue by setting the `type` attribute to `button`.
Not only for the toggle switch, but also for a few other elements which
have been recently converted to buttons.

[1] https://www.w3.org/TR/2011/WD-html5-20110525/the-button-element.html#attr-button-type
2023-01-10 22:58:20 +01:00
..
app Toggle switch shouldn't submit form 2023-01-10 22:58:20 +01:00
cards Add:Global library search also searches on podcast episode titles #1363 2023-01-04 17:43:15 -06:00
controls Update max playback speed to 10x 2023-01-07 16:18:52 -06:00
covers Music albums grouping and page 2023-01-02 18:02:04 -06:00
modals Update:Manual match tab prefer using ASIN with audible providers #1352 2023-01-07 16:22:59 -06:00
player Update:Remove call to server for user settings, user settings stored locally 2022-12-17 14:50:01 -06:00
prompt Update:More localization strings #1103 2022-11-07 18:27:17 -06:00
readers Start of new epub reader 2023-01-01 18:09:00 -06:00
stats Update:Stats translation for Overall Days/Hours 2022-11-14 17:55:45 -06:00
tables Toggle switch shouldn't submit form 2023-01-10 22:58:20 +01:00
ui Toggle switch shouldn't submit form 2023-01-10 22:58:20 +01:00
widgets Update:Handle badly formatted series sequence from Audible #1339 2023-01-07 16:33:20 -06:00