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

feat: implement click outside functionality for popup window #2628

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

Conversation

laxmanrathod69
Copy link

Fixes Issue

Closes #2619

Changes proposed

  • Added click outside functionality to popup window using useOnClickOutside hook
  • Improved popup window UX by closing when clicking anywhere outside

Note to reviewers

  • The click outside functionality uses a custom hook useOnClickOutside
  • Event listeners are properly cleaned up on unmount
  • The implementation maintains accessibility by keeping dialog role
  • Tested across different browsers for consistent behavior

Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
linkshub ❌ Failed (Inspect) Jan 29, 2025 7:03am

@github-actions github-actions bot added accessibility Code is not up to WCAG standards goal: new-feature New feature or request priority: high Making completely new feature priority: medium Modifying an existing feature labels Jan 29, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks Passed!

@laxmanrathod69
Copy link
Author

Please review and merge #2628 if everything looks good.

Summary of Changes:

  • Added click outside functionality for the popup window using a custom useOnClickOutside hook.
  • Improved the UX by ensuring the popup closes when clicking outside.
  • Ensured proper cleanup of event listeners on component unmount.
  • Maintained accessibility standards by keeping the dialog role intact.
  • Tested across multiple browsers for consistent behavior.

Let me know if there's anything else you'd like me to address!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Code is not up to WCAG standards goal: new-feature New feature or request priority: high Making completely new feature priority: medium Modifying an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close details popup when clicking outside
1 participant