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

fix(datepicker): focus trap in FireFox #17969

Merged
merged 5 commits into from
Nov 6, 2024
Merged

Conversation

2nikhiltom
Copy link
Contributor

Closes #17663

Fixes focus trap in datepicker range variant during Keyboard Navigation in Firefox browser

Changelog

Removed

Removes the manual blur() function when closing the calendar to fix issues with focus in Firefox.
document.activeElement.blur()
blur() was initially added as a secondary safeguard to prevent the focus from staying on the input

Testing / Reviewing

open deploy preview in FireFox
Open DatePicker - "range with Calendar" storybook example
Select the dates using keyboard after selection of end date press tab and verify that the focus moves to the next focusable element in the DOM

Verify the clicking away from datepicker closes any open calendars

@2nikhiltom 2nikhiltom requested a review from a team as a code owner November 5, 2024 12:49
Copy link

netlify bot commented Nov 5, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 2f551e0
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/672b4e63025ba20009b9efee
😎 Deploy Preview https://deploy-preview-17969--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 5, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 2f551e0
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/672b4e63371bf900085a8532
😎 Deploy Preview https://deploy-preview-17969--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 5, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit ac68abb
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/672a147a0e3905000803ca57
😎 Deploy Preview https://deploy-preview-17969--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.78%. Comparing base (ba6bf6d) to head (2f551e0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17969      +/-   ##
==========================================
+ Coverage   81.76%   81.78%   +0.01%     
==========================================
  Files         406      406              
  Lines       14053    14048       -5     
  Branches     4408     4405       -3     
==========================================
- Hits        11491    11489       -2     
+ Misses       2400     2397       -3     
  Partials      162      162              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

netlify bot commented Nov 5, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 2f551e0
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/672b4e635aaf600008cbf1ba
😎 Deploy Preview https://deploy-preview-17969--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@guidari guidari self-requested a review November 5, 2024 17:57
Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@2nikhiltom 2nikhiltom enabled auto-merge November 6, 2024 11:17
@2nikhiltom 2nikhiltom added this pull request to the merge queue Nov 6, 2024
Merged via the queue into main with commit d459e8c Nov 6, 2024
40 checks passed
@2nikhiltom 2nikhiltom deleted the 17663_datepicker_focus branch November 6, 2024 11:50
Copy link
Contributor

github-actions bot commented Nov 6, 2024

The content of this pull request will be made available as part of our next release. For the full schedule of upcoming releases, check out our Release Radar page.

@carbon-automation
Copy link
Contributor

Hey there! v11.70.0 was just released that references this issue/PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants