-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[$500] Web - Password protected PDF password field stays in focus even on error #27281
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.App keeps the focus on the password field after an error in password protected PDF preview What is the root cause of that problem?Input gets focused when we enter the page. App/src/components/PDFView/PDFPasswordForm.js Lines 91 to 96 in 467f396
What changes do you think we should make in order to solve the problem?We should blur every submission. const submitPassword = () => {
if (textInputRef.current) {
textInputRef.current.blur();
} Result: Screen.Recording.2023-09-12.at.23.17.59.movWhat alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~014ece584d36e5bf8f |
Triggered auto assignment to @garrettmknight ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @CortneyOfstad ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @burczu ( |
ProposalProblemPassword protected PDF password field stays in focus even on error Root causeWe are not removing focus from input when there is a error changesBlur textinput if there is a errortext. const errorText = useMemo(() => {
if (isPasswordInvalid) {
textInputRef.current.blur()
return translate('attachmentView.passwordIncorrect');
}
if (!_.isEmpty(validationErrorText)) {
textInputRef.current.blur()
return translate(validationErrorText);
}
return '';
}, [isPasswordInvalid, translate, validationErrorText]); |
It seems expected behavior since this change #26025 |
Yup, agree, I also think it's expected behaviour |
It is inconsistent with other fields throughout the app |
This feels pretty consistent in this password case. We're keeping focused on the only thing you can interact with and you'd want to retype your password or leave. Closing. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
App should lose focus from the password field after error as we do for all the fields throughout the app
Actual Result:
App keeps the focus on the password field after error in password protected PDF preview
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.68.12
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
focus.retained.password.protected.PDF.error.mp4
Recording.4420.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694280104869819
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: