You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-07-05] [$2000] iOS - Keyboard does not hide when switching between attachments with focused password input field #19156
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Send several attachments including PDF-protected file
Click to preview on PDF-protected file -> Press Enter a password
Switching to another attachment
Expected Result:
Keyboard should be hidden
Actual Result:
Keyboard does not hide
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: v1.3.15-6 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
Please re-state the problem that we are trying to solve in this issue.
Keyboard does not hide when switching between attachments with focused password input field.
What is the root cause of that problem?
There is no Keyboard.dismiss(); when next/prev button press
What changes do you think we should make in order to solve the problem?
When the user navigates away from the PDF password form by clicking on the arrow buttons, dismiss the keyboard.
call Keyboard.dismiss(); in next/prev button onPresshere and here
When the user clicks on the eye icon while the keyboard is open, it should toggle immediately without dismissing keyboard.
Add keyboardShouldPersistTaps="handled" to AttachmentCarousel Flatlist here.
When the user navigates away from the PDF password form to other attachments by swiping, dismiss the keyboard
Add keyboardDismissMode="on-drag" to AttachmentCarousel Flatlist here.
When the user navigates back to the PDF password form, focus the input and bring up the keyboard again
pass isPageActive to AttchmentView here then here then here
// in AttchmentViewisPageActive={this.state.attachments[this.state.page].source===item.source}// in PDFPasswordFormcomponentDidUpdate(prevProps){if(!prevProps.isPageActive&&this.props.isPageActive&&this.textInputRef){this.textInputRef.focus();}}<TextInputref={(el)=>(this.textInputRef=el)}/>
fix auto-focus doesn't work when swipe between protected PDFs quickly
This because when you swipe quickly, swipe not complete to view the whole PDF.
We can fix it by reduce itemVisiblePercentThreshold: 95 to 75
// To facilitate paging through the attachments, we want to consider an item "viewable" when it is
// more than 90% visible. When that happens we update the page index in the state.
itemVisiblePercentThreshold: 95,
};
fix auto-focus not work in safari (this issue happened with me last week, but now it is not reproducible).
If this issue appears again, the fix should be.
surround this.textInputRef.focus(); with timeout 300 if browser is mobile safari
// in PDFPasswordFormimport*asBrowserfrom'../../libs/Browser';componentDidUpdate(prevProps){if(!prevProps.isPageActive&&this.props.isPageActive&&this.textInputRef){constisMobileSafari=Browser.isMobileSafari();if(isMobileSafari){setTimeout(()=>this.textInputRef.focus(),300)}else{this.textInputRef.focus();}}}
What alternative solutions did you explore? (Optional)
I'm unable to reproduce on the browserstack emulator on iPhone 13 v16.3.
The arrow buttons are inconsistent. I was not able to figure out how to get them to show up if they weren't showing up. Swiping between attachments closes the keyboard.
changed the title [-][$2000] iOS - Keyboard does not hide when switching between attachments with focused password input field[/-][+][HOLD for payment 2023-07-05] [$2000] iOS - Keyboard does not hide when switching between attachments with focused password input field[/+]on Jun 28, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.33-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-07-05. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
Merged PR within 3 business days of assignment - 50% bonus
Merged PR more than 9 business days after assignment - 50% penalty
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
[@aimane-chnaif] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@aimane-chnaif] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@aimane-chnaif] Determine if we should create a regression test for this bug.
[@aimane-chnaif] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon May 17, 2023
Triggered auto assignment to @sonialiap (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon May 17, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)ahmedGaber93 commentedon May 17, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Keyboard does not hide when switching between attachments with focused password input field.
What is the root cause of that problem?
There is no Keyboard.dismiss(); when next/prev button press
What changes do you think we should make in order to solve the problem?
When the user navigates away from the PDF password form by clicking on the arrow buttons, dismiss the keyboard.
call
Keyboard.dismiss();in next/prev buttononPresshere and hereWhen the user clicks on the eye icon while the keyboard is open, it should toggle immediately without dismissing keyboard.
Add
keyboardShouldPersistTaps="handled"to AttachmentCarousel Flatlist here.When the user navigates away from the PDF password form to other attachments by swiping, dismiss the keyboard
Add
keyboardDismissMode="on-drag"to AttachmentCarousel Flatlist here.When the user navigates back to the PDF password form, focus the input and bring up the keyboard again
pass
isPageActiveto AttchmentView here then here then hereThis because when you swipe quickly, swipe not complete to view the whole PDF.
We can fix it by reduce
itemVisiblePercentThreshold: 95to 75App/src/components/AttachmentCarousel/index.js
Lines 53 to 57 in 035783a
If this issue appears again, the fix should be.
surround
this.textInputRef.focus();with timeout 300 if browser is mobile safariWhat alternative solutions did you explore? (Optional)
sonialiap commentedon May 23, 2023
I'm unable to reproduce on the browserstack emulator on iPhone 13 v16.3.
The arrow buttons are inconsistent. I was not able to figure out how to get them to show up if they weren't showing up. Swiping between attachments closes the keyboard.
Enjoy my struggle 😂
Screen.Recording.2023-05-23.at.3.25.39.PM.mov
sonialiap commentedon May 23, 2023
@ahmedGaber93 since you proposed a solution, are you able to reproduce this issue?
ahmedGaber93 commentedon May 23, 2023
@sonialiap yes, I am able to reproduce.
Screen.Recording.2023-05-23.at.7.30.31.PM.mov
sonialiap commentedon May 25, 2023
Thanks! Adding the external label
94 remaining items
dukenv0307 commentedon Jun 23, 2023
@aimane-chnaif #21367 The PR is ready for review
melvin-bot commentedon Jun 26, 2023
🎯 ⚡️ Woah @aimane-chnaif / @dukenv0307, great job pushing this forwards! ⚡️
The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀
[-][$2000] iOS - Keyboard does not hide when switching between attachments with focused password input field[/-][+][HOLD for payment 2023-07-05] [$2000] iOS - Keyboard does not hide when switching between attachments with focused password input field[/+]melvin-bot commentedon Jun 28, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 28, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.33-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-07-05. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon Jun 28, 2023
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
aimane-chnaif commentedon Jul 5, 2023
No PRs caused regression. These were missing cases while implementing new feature of attachment carousel.
Regression Test Step:
sonialiap commentedon Jul 5, 2023
@dukenv0307 offer sent for fix (+bonus) - paid ✔️
@aimane-chnaif offer sent for review (+bonus) - paid ✔️