-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix condition preventing props.onFocus execution #5315
Fix condition preventing props.onFocus execution #5315
Conversation
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.
✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!
What to expect from this code review:
- Comments posted to any areas of potential concern or improvement.
- Detailed feedback or actions needed to resolve issues that are found.
- Turnaround times vary, but we aim to be swift.
@dshster you can click here to see the review status or cancel the code review job.
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.
PullRequest Breakdown
Reviewable lines of change
+ 32
- 2
76% TSX (tests)
24% TSX
Type of change
Fix - These changes are likely to be fixing a bug or issue.
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.
Please check the output of https://github.com/Hacker0x01/react-datepicker/actions/runs/12751165481/job/35545719040?pr=5315. Seems there's a little formatting issue. |
e615a1e
to
1285af4
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5315 +/- ##
=======================================
Coverage 96.92% 96.92%
=======================================
Files 30 30
Lines 3413 3416 +3
Branches 1425 1427 +2
=======================================
+ Hits 3308 3311 +3
Misses 103 103
Partials 2 2 ☔ View full report in Codecov by Sentry. |
Fixing the prevention of executing props.onFocus after the visibilitychange event occurs.
Problem
In MR #4878, the behavior of the calendar popup when switching browser tabs has been fixed. However, the
props.onFocus
callback in thehandleFocus
method was blocked if a browser tab was switched before.Changes
I've moved the
isOpenAllowed
flag condition checking so that theprops.onFocus
callback will execute as before, regardless of the calendar popup opening.Contribution checklist