audiobookshelf/client/components/app
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
..
Appbar.vue Bookshelf updates for music tracks 2023-01-03 18:00:01 -06:00
BookShelfCategorized.vue Bookshelf updates for music tracks 2023-01-03 18:00:01 -06:00
BookShelfRow.vue
BookShelfToolbar.vue Update:Libraries table using context menu instead of hover buttons. Cleanup mobile view #1342 2023-01-07 17:14:55 -06:00
ConfigSideNav.vue Fix Hidden Settings Menu 2023-01-01 19:49:43 +01:00
LazyBookshelf.vue Bookshelf updates for music tracks 2023-01-03 18:00:01 -06:00
SettingsContent.vue Toggle switch shouldn't submit form 2023-01-10 22:58:20 +01:00
SideRail.vue Music albums grouping and page 2023-01-02 18:02:04 -06:00
StreamContainer.vue Update:Cleanup audio player 2023-01-08 09:38:37 -06:00