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(Notification): add NPE check in escape close handler #17528

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Sep 19, 2024

Closes #16874

This PR adds a NPE check to the Notification Esc key handler to prevent console errors after dismissal

Changelog

Changed

  • Notification useEscapeToClose handler

Testing / Reviewing

  • view the Actionable Notification story
  • dismiss the notification
  • press Tab
  • confirm no errors are logged in the console

@emyarod emyarod force-pushed the 16874-fix/notification-tab-error-on-close branch from 73027d9 to 6af2c70 Compare September 19, 2024 13:32
Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 73027d9
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66ec27a86c83380008e3afe0
😎 Deploy Preview https://deploy-preview-17528--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 Sep 19, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 73027d9
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66ec27a8ecea110008034db7
😎 Deploy Preview https://deploy-preview-17528--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

netlify bot commented Sep 19, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 6af2c70
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66ec27e31cf26a00080a52e7
😎 Deploy Preview https://deploy-preview-17528--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

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.95%. Comparing base (72c80b3) to head (6af2c70).
Report is 724 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17528   +/-   ##
=======================================
  Coverage   76.95%   76.95%           
=======================================
  Files         408      408           
  Lines       13979    13979           
  Branches     4343     4343           
=======================================
  Hits        10758    10758           
  Misses       3047     3047           
  Partials      174      174           

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

Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 6af2c70
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66ec27e335e7a90008ac0424
😎 Deploy Preview https://deploy-preview-17528--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.

@ariellalgilmore ariellalgilmore added this pull request to the merge queue Sep 21, 2024
Merged via the queue into carbon-design-system:main with commit e4fe031 Sep 21, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Notification throws an error when Close button is clicked followed by the tab key.
3 participants