Fix form submission handler regression from class-to-functional conversion #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a regression introduced during the conversion of the Login component from class-based to functional component in October 2021.
🐛 Regression Details
Introduced in:
d12fad6bd4ab50bdacfae76e7c6631d845c2fcdc(Oct 12, 2021)Commit: "Add support for visual branding of identifier"
File:
identifier/src/containers/Login/Login.jsx:137What Happened
During the class-to-functional component conversion:
logonmethod was correctly renamed tohandleNextClickonClickwas correctly updated to usehandleNextClickonSubmitwas left with the oldthis.logon(event)referenceWhy It Wasn't Noticed
The application continued to work normally because:
onClickhandler (standard HTML behavior)onClick={handleNextClick}worked correctlyonSubmithandler was never actually called due to browser behavior🔧 Fix Applied
Before:
After:
✅ Verification
📋 Testing
Before Fix
onSubmitreferenced non-existentthis.logonmethodAfter Fix
onSubmitcorrectly referenceshandleNextClick🎯 Impact
This is a code quality fix that resolves a long-standing regression without changing any user-visible behavior.