Skip to content

Commit c1edac3

Browse files
committed
Fix form submission handler regression introduced in class-to-functional conversion
This fixes a regression introduced in commit d12fad6 'Add support for visual branding of identifier' where the Login component was converted from class-based to functional component. During the conversion: - The 'logon' method was correctly renamed to 'handleNextClick' - The button's onClick was correctly updated to use 'handleNextClick' - However, the form's onSubmit was left with the old 'this.logon(event)' reference This resulted in a broken form submission handler that referenced a non-existent method. The application continued to work because Enter key presses trigger the submit button's onClick handler due to standard HTML form behavior, masking the regression. Changes: - Replace broken 'onSubmit={(event) => this.logon(event)}' with 'onSubmit={handleNextClick}' - Ensures consistent behavior between form submission and button click - Maintains existing preventDefault behavior and proper form handling Regression introduced: d12fad6 (Oct 12, 2021) Component: identifier/src/containers/Login/Login.jsx:137
1 parent ae1dab4 commit c1edac3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

identifier/src/containers/Login/Login.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function Login(props) {
134134
{t("konnect.login.headline", "Sign in")}
135135
</Typography>
136136

137-
<form action="" onSubmit={(event) => this.logon(event)}>
137+
<form action="" onSubmit={handleNextClick}>
138138
<TextField
139139
label={usernamePlaceHolder}
140140
error={!!errors.username}

0 commit comments

Comments
 (0)