-
-
Notifications
You must be signed in to change notification settings - Fork 362
doc(Template5): add auto focus function #6490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideImplements auto-focus and auto-select on input fields in the Template5 login/register tutorial by invoking focus() and select() whenever an email or password step is shown or revisited. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ArgoZhang - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/BootstrapBlazor.Server/Components/Samples/Tutorials/LoginAndRegister/Template5.razor.js:29` </location>
<code_context>
password.classList.add('show');
password.classList.add('animate-fade-in')
password.classList.remove('animate-fade-out')
+ const input = password.querySelector('.input');
+ input.focus();
+ input.select();
}
}
</code_context>
<issue_to_address>
Add a null check for the input element before calling focus/select.
Check if 'input' is not null before calling focus() and select() to avoid runtime errors if the element is missing.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
src/BootstrapBlazor.Server/Components/Samples/Tutorials/LoginAndRegister/Template5.razor.js
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6490 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 714 714
Lines 31383 31383
Branches 4431 4431
=========================================
Hits 31383 31383
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #6489
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add autofocus and text selection to the email and password input fields in Template5 during the login/register flow
Enhancements: