Skip to content

Conversation

@balajis-qb
Copy link
Contributor

@balajis-qb balajis-qb commented Feb 25, 2025

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

  • I have followed the contributing guidelines.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

…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
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.93%. Comparing base (cd1789c) to head (1dd9352).
Report is 14 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@martijnrusschen martijnrusschen merged commit d78d52c into Hacker0x01:main Feb 25, 2025
6 checks passed
DawoudIO added a commit to ChurchCRM/CRM that referenced this pull request Apr 7, 2025
![snyk-top-banner](https://redirect.github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)


<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&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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&#x3D;react-datepicker&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Focus behaviour after closing changed after 7.6.0

2 participants