mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 12:52:26 -05:00
[bugfix/frontend] Add nosubmit option to form fields + use it when instance custom CSS disabled (#2290)
This commit is contained in:
parent
4facad3d81
commit
48a0687736
6 changed files with 29 additions and 6 deletions
|
|
@ -87,10 +87,10 @@ export default function useFormSubmit(
|
|||
if (e.nativeEvent.submitter) {
|
||||
// We want the name of the element that was invoked to submit this form,
|
||||
// which will be something that extends HTMLElement, though we don't know
|
||||
// what at this point.
|
||||
// what at this point. If it's an empty string, fall back to undefined.
|
||||
//
|
||||
// See: https://developer.mozilla.org/en-US/docs/Web/API/SubmitEvent/submitter
|
||||
action = (e.nativeEvent.submitter as Object as { name: string }).name;
|
||||
action = (e.nativeEvent.submitter as Object as { name: string }).name || undefined;
|
||||
} else {
|
||||
// No submitter defined. Fall back
|
||||
// to just use the FormSubmitEvent.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue