Skip to content
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

[Snyk] Upgrade react-focus-on from 3.9.1 to 3.9.2 #7624

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JasonStoltz
Copy link
Member

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to upgrade react-focus-on from 3.9.1 to 3.9.2.

ℹ️ 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.


  • The recommended version is 1 version ahead of your current version.
  • The recommended version was released 23 days ago, on 2024-03-03.

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:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Snyk has created this PR to upgrade react-focus-on from 3.9.1 to 3.9.2.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/eui/project/782ac3a8-8bb4-4658-baa9-190d6cb035f1?utm_source=github-enterprise&utm_medium=referral&page=upgrade-pr
@JasonStoltz JasonStoltz requested a review from a team as a code owner March 26, 2024 18:58
@mgadewoll mgadewoll self-assigned this Mar 28, 2024
@mgadewoll
Copy link
Contributor

This upgrade updates internal dependencies only, see the changes here.

Dependencies updated:

  • react-focus-lock: ^2.9.4 -> ^2.11.2, (changes)
  • react-remove-scroll: ^2.5.6 -> ^2.5.7 (changes)
  • react-style-singleton: ^2.2.0 -> ^2.2.1 (changes)

ℹ️ Affected components:

  • EuiFocusTrap - used in:
    • EuiOverlayMask
    • EuiFlyout
    • EuiCustomFlyout
    • EuiCodeBlock (fullscreen)
    • EuiDataGrid (fullscreen)
    • EuiImage (fullscreen)
    • EuiModal
    • EuiInputPopover
    • EuiPopover

✅ There were no regression issues found for EuiFocusTrap through manual testing.

@cee-chen
Copy link
Member

FYI, this is a potentially high risk/high impact set of dependency / subdependency updates - we semi-frequently contribute back to react-focus-on and it's many sub-dependencies to get the fixes/functionality we need. We have "react-focus-lock": "^2.9.5" pinned in our package.json for one of those fixes, and we should go ahead and remove that now

@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 28, 2024

💔 Build Failed

Failed CI Steps

History

cc @mgadewoll

@kibanamachine
Copy link

Preview staging links for this PR:

@mgadewoll
Copy link
Contributor

mgadewoll commented Apr 2, 2024

FYI, this is a potentially high risk/high impact set of dependency / subdependency updates - we semi-frequently contribute back to react-focus-on and it's many sub-dependencies to get the fixes/functionality we need. We have "react-focus-lock": "^2.9.5" pinned in our package.json for one of those fixes, and we should go ahead and remove that now

⚠️ After removing the fixed resolution for react-focus-lock some tests for focus_utils.spec.tsx started failing.
After opening the actions popover of a cell, the tests expect focus to return to the cell (button) when pressing ESCAPE on the opened actions popover. Instead it moves to the first focusable item in the grid toolbar.

current

Screenshot 2024-04-02 at 17 39 36

expected

Screenshot 2024-04-02 at 17 39 59

It seems that with react-focus-on version 2.11.0 there where underlying changes to returning focus that change the behavior.

🔍 It might be related to this change:

  • The activeElement passed to captureFocusRestore is the cell button that previously was focused on returned focus
  • The newly returned element that comes back from restoreFocusTo called inside captureFocusRestore is now the toolbar action button

📦 Some dependency update info on when it starts breaking:

  • the dependency focus-lock added the returnFocusTo functionality in version 1.2.0 which react-focus-lock added in version 2.10.1 (version comparison here)
  • react-focus-lock started using captureFocusRestore in version 2.11.0 (version comparison here)

@mgadewoll mgadewoll mentioned this pull request May 10, 2024
10 tasks
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.

None yet

6 participants