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

Close checks list when clicking outside of modal #7157

Closed
Katsute opened this issue Dec 13, 2023 · 4 comments · Fixed by #7169
Closed

Close checks list when clicking outside of modal #7157

Katsute opened this issue Dec 13, 2023 · 4 comments · Fixed by #7169

Comments

@Katsute
Copy link
Contributor

Katsute commented Dec 13, 2023

Description

Clicking anywhere outside the modal should just close it, every other modal that GH uses does close when you click outside the modal.

  1. Click on the check:

    image

  2. Click anywhere outside the modal:

    (modal does not close)

    image

Example URLs

(any page that shows a commit check)


@a0m0rajab
Copy link
Contributor

This could be done by adding a click event listener to: div.Dialog__Backdrop-sc-uaxjsn-0.gmJJZ and check if the target is that specific element then click on the X button.

I could not get the dialog in the first link provided for examples though.

@fregante
Copy link
Member

That's too bad, GitHub has always dealt with modals pretty well, especially because they never had a darkened background so people don't even know it's a modal. We used to have a feature for that #735

For what it's worth, that modal can be closed via ESC

@Katsute
Copy link
Contributor Author

Katsute commented Dec 17, 2023

Implemented on https://github.com/Katsute/refined-github/blob/9715f1caecd100c2b8c456b247a94d349e87c076/source/features/checks-modal.tsx using class^= and class*=

Should I open a PR for this feature?

@a0m0rajab
Copy link
Contributor

@Katsute thanks for taking this, I think you could open a PR. If @fregante does not want it, he will just close it. Otherwise, your PR will get a code review 😄 . This might save you and him some time due to the time zone differences.

Note: I am just an external programmer for the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants