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

Improve outside click detection on search modal #85

Merged
merged 3 commits into from
May 24, 2023

Conversation

BryceRussell
Copy link
Member

@BryceRussell BryceRussell commented May 23, 2023

What kind of changes does this PR include?

  • Changes to Starlight code

Description

Fixes Bug: Clicking the "Load more results" button closes the search modal

  • Improve outside click detection on search modal
  • Check if click target exists inside the DOM before closing

- Check if event target is inside the DOM before closing search modal
@changeset-bot
Copy link

changeset-bot bot commented May 23, 2023

🦋 Changeset detected

Latest commit: 2c064e1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented May 23, 2023

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 2c064e1
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/646ddced690d710008e1c233
😎 Deploy Preview https://deploy-preview-85--astro-starlight.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 settings.

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Ohhhh right! Because when you click the “Load results” button, the button is removed from the DOM, and then that check isn’t true. Nice bug and nice job figuring it out. Thanks @BryceRussell!

@delucis delucis merged commit c86c1d6 into withastro:main May 24, 2023
6 of 7 checks passed
@astrobot-houston astrobot-houston mentioned this pull request May 24, 2023
@BryceRussell BryceRussell deleted the search-modal-click-out branch June 12, 2023 18:37
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

2 participants