audiobookshelf/client/components/ui
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
..
Btn.vue Fix:Icon sizes 2022-11-21 07:18:10 -06:00
Checkbox.vue Add:Local setting for autoplay next item in queue #603 2022-08-28 14:21:28 -05:00
ContextMenuDropdown.vue Update:Libraries table using context menu instead of hover buttons. Cleanup mobile view #1342 2023-01-07 17:14:55 -06:00
Dropdown.vue Accessibility Improvements for Main Settings 2022-12-30 19:14:04 +01:00
EditableText.vue Support for libraries and folder mapping, updating static cover path, detect reader.txt 2021-10-04 22:11:42 -05:00
FileInput.vue Update:Edit modal for mobile screen sizes and update tailwind 2022-06-26 11:15:19 -05:00
IconBtn.vue Add:Notification edit/delete and UI updates #996 2022-09-24 14:03:14 -05:00
InputDropdown.vue Update:Editing series on book in edit modal sets focus to first available input #889 2022-08-03 18:38:08 -05:00
LibrariesDropdown.vue Merge pull request #1335 from lkiesow/keyboard-navigation-libraries 2022-12-28 17:18:35 -06:00
LibraryIcon.vue Update:New library icons and picker using icon font 2022-10-18 12:09:36 -05:00
LoadingIndicator.vue Add audiobook uploader 2021-09-13 20:18:58 -05:00
MediaIconPicker.vue Update:New library icons and picker using icon font 2022-10-18 12:09:36 -05:00
Menu.vue Fix:Icon sizes 2022-11-21 07:18:10 -06:00
MultiSelect.vue Fix scroll listener for multi select inputs 2022-12-19 16:10:45 -06:00
MultiSelectDropdown.vue Fix scroll listener for multi select inputs 2022-12-19 16:10:45 -06:00
MultiSelectQueryInput.vue Fix:Update authors in different order #1361 2023-01-04 17:21:25 -06:00
QueryInput.vue Fix:Edit modal dropdown menus hidden #1295 2022-12-19 15:32:17 -06:00
ReadIconBtn.vue Fix: Setting root socket error, Change: collection books table ordering and icons #151 2021-11-07 15:28:06 -06:00
RichTextEditor.vue Add:Rich text editor for podcast episode description 2022-05-28 13:36:58 -05:00
TextareaInput.vue New data model removing media entity for books 2022-03-26 11:59:34 -05:00
TextareaWithLabel.vue New data model removing media entity for books 2022-03-26 11:59:34 -05:00
TextInput.vue Make User Settings Accessible via Screen Reader 2022-12-29 05:00:40 +01:00
TextInputWithLabel.vue Remove extra space from label 2022-12-29 18:03:05 -06:00
TimePicker.vue Update:Timestamp input support over 99 hours and focus input #657 2022-07-25 19:32:04 -05:00
ToggleSwitch.vue Toggle switch shouldn't submit form 2023-01-10 22:58:20 +01:00
Tooltip.vue Make Tooltips Accessible 2022-11-20 20:02:31 +01:00
VueTrix.vue Add:Rich text editor for podcast episode description 2022-05-28 13:36:58 -05:00