-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix #5366: 🐛 Fix the re-focus issue of the DatePicker element when the open state is controlled manually #5448
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
Merged
martijnrusschen
merged 1 commit into
Hacker0x01:main
from
qburst:issue-5366/fix/refocus-issue-on-controlled-state-management
Feb 25, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e is controlled manually - Defer the blur call alone to fix the issue Hacker0x01#5084 - Fix the bug caused in the commit d07308d Closes Hacker0x01#5366
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5448 +/- ##
==========================================
- Coverage 96.93% 96.93% -0.01%
==========================================
Files 30 30
Lines 3326 3324 -2
Branches 1410 1396 -14
==========================================
- Hits 3224 3222 -2
- Misses 100 102 +2
+ Partials 2 0 -2 ☔ View full report in Codecov by Sentry. |
DawoudIO
added a commit
to ChurchCRM/CRM
that referenced
this pull request
Apr 7, 2025
 <h3>Snyk has created this PR to upgrade react-datepicker from 8.1.0 to 8.2.0.</h3> :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project. <hr/> - The recommended version is **1 version** ahead of your current version. - The recommended version was released **23 days ago**. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>react-datepicker</b></summary> <ul> <li> <b>8.2.0</b> - <a href="https://redirect.github.com/Hacker0x01/react-datepicker/releases/tag/v8.2.0">2025-03-10</a></br><h2>What's Changed</h2> <ul> <li>🔧 Update the production build script config to include css:modules:prod by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/balajis-qb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/balajis-qb">@ balajis-qb</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2866054012" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5436" data-hovercard-type="pull_request" data-hovercard-url="/Hacker0x01/react-datepicker/pull/5436/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/pull/5436">#5436</a></li> <li>Fix <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2821649459" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5366" data-hovercard-type="issue" data-hovercard-url="/Hacker0x01/react-datepicker/issues/5366/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/issues/5366">#5366</a>: 🐛 Fix the re-focus issue of the DatePicker element when the open state is controlled manually by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/balajis-qb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/balajis-qb">@ balajis-qb</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2877607460" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5448" data-hovercard-type="pull_request" data-hovercard-url="/Hacker0x01/react-datepicker/pull/5448/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/pull/5448">#5448</a></li> <li>fix: set css class for the current quarter by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/maksimyaromin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/maksimyaromin">@ maksimyaromin</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2904922873" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5472" data-hovercard-type="pull_request" data-hovercard-url="/Hacker0x01/react-datepicker/pull/5472/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/pull/5472">#5472</a></li> <li>fix: 5428 ContainerRef Propagation by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yuki0410-dev/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/yuki0410-dev">@ yuki0410-dev</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2879829879" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5456" data-hovercard-type="pull_request" data-hovercard-url="/Hacker0x01/react-datepicker/pull/5456/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/pull/5456">#5456</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/maksimyaromin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/maksimyaromin">@ maksimyaromin</a> made their first contribution in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2904922873" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5472" data-hovercard-type="pull_request" data-hovercard-url="/Hacker0x01/react-datepicker/pull/5472/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/pull/5472">#5472</a></li> </ul> <p><strong>Full Changelog</strong>: <a class="commit-link" href="https://redirect.github.com/Hacker0x01/react-datepicker/compare/v8.1.0...v8.2.0"><tt>v8.1.0...v8.2.0</tt></a></p> </li> <li> <b>8.1.0</b> - <a href="https://redirect.github.com/Hacker0x01/react-datepicker/releases/tag/v8.1.0">2025-02-17</a></br><h2>What's Changed</h2> <ul> <li>Fix <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2730594768" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5274" data-hovercard-type="issue" data-hovercard-url="/Hacker0x01/react-datepicker/issues/5274/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/issues/5274">#5274</a>: 🐛 Auto refresh the input value with the previously entered valid value if any invalid value is entered (when the open state is closed) by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/balajis-qb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/balajis-qb">@ balajis-qb</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2856011361" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5417" data-hovercard-type="pull_request" data-hovercard-url="/Hacker0x01/react-datepicker/pull/5417/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/pull/5417">#5417</a></li> <li>Fix: Make CalendarIconProps.icon optional to prevent type error by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jingjing2222/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/jingjing2222">@ jingjing2222</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2844544321" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5406" data-hovercard-type="pull_request" data-hovercard-url="/Hacker0x01/react-datepicker/pull/5406/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/pull/5406">#5406</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jingjing2222/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/jingjing2222">@ jingjing2222</a> made their first contribution in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2844544321" data-permission-text="Title is private" data-url="Hacker0x01/react-datepicker#5406" data-hovercard-type="pull_request" data-hovercard-url="/Hacker0x01/react-datepicker/pull/5406/hovercard" href="https://redirect.github.com/Hacker0x01/react-datepicker/pull/5406">#5406</a></li> </ul> <p><strong>Full Changelog</strong>: <a class="commit-link" href="https://redirect.github.com/Hacker0x01/react-datepicker/compare/v8.0.0...v8.1.0"><tt>v8.0.0...v8.1.0</tt></a></p> </li> </ul> from <a href="https://redirect.github.com/Hacker0x01/react-datepicker/releases">react-datepicker GitHub release notes</a> </details> </details> --- > [!IMPORTANT] > > - Check the changes in this PR to ensure they won't cause issues with your project. > - This PR was automatically created by Snyk using the credentials of a real user. --- **Note:** _You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs._ **For more information:** <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJiZWQ4OTM3NS1lMDY1LTRlMzctOTI4OS1hYzdhNTFjZjY4ODMiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImJlZDg5Mzc1LWUwNjUtNGUzNy05Mjg5LWFjN2E1MWNmNjg4MyJ9fQ==" width="0" height="0"/> > - 🧐 [View latest project report](https://app.snyk.io/org/dawoudio/project/e27b08aa-e5d2-4b10-8303-630a69d0b669?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 📜 [Customise PR templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template) > - 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/dawoudio/project/e27b08aa-e5d2-4b10-8303-630a69d0b669/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/dawoudio/project/e27b08aa-e5d2-4b10-8303-630a69d0b669/settings/integration?pkg=react-datepicker&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) [//]: # 'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"react-datepicker","from":"8.1.0","to":"8.2.0"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"bed89375-e065-4e37-9289-ac7a51cf6883","prPublicId":"bed89375-e065-4e37-9289-ac7a51cf6883","packageManager":"npm","priorityScoreList":[],"projectPublicId":"e27b08aa-e5d2-4b10-8303-630a69d0b669","projectUrl":"https://app.snyk.io/org/dawoudio/project/e27b08aa-e5d2-4b10-8303-630a69d0b669?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":1,"publishedDate":"2025-03-10T10:29:18.986Z"},"vulns":[]}'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #5366
Problem
As described in the linked ticket, the fix we made for the issue (related to FireFox Tab press) delays the blur and focus call to the next render cycle. That's causing an issue when the consumer manually controls the open and the close state via onFocus event. As a fix I just the defer the execution of the blur call after the state updates for setOpen.
Changes
Contribution checklist