Commit c1edac3
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:1371 parent ae1dab4 commit c1edac3
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
0 commit comments