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 Dialog by clicking ouside of it #7885

Merged
merged 1 commit into from Feb 15, 2020

Conversation

ajbozarth
Copy link
Contributor

References

Fixes #3784

Code changes

Closes a model/dialog by clicking the greyed out area outside of it.
This functionality is the same as if the user clicked the esc key.

This also addresses an undiscovered bug: Currently if a user clicks outside a dialog all the keyboard related events (escape, enter, tab) stop working until the user interacts with the dialog again (eg. changing a form value). This is "fixed" since clicking outside now closes the dialog.

User-facing changes

UX change: clicking outside a dialog closes it rather than doing nothing.

Backwards-incompatible changes

N/A

Closes a model/dialog by clicking the greyed out area outside of it.
This functionality is the same as if the user clicked the esc key.
@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@ajbozarth
Copy link
Contributor Author

This ended up being a tiny change after I looked into it for a while.

I believe @blink1073 was the last to touch this code.

@tgeorgeux is this what you were thinking, or do you want the "click outside the dialog" functionality to be more than just "do the same as clicking escape"?

@jasongrout
Copy link
Contributor

Oh, wow, thanks for fixing this. I didn't realize this wasn't happening already.

I tried it and it looks like it is working well.

@tgeorgeux
Copy link
Contributor

That's exactly the behavior I was looking for! Thanks @ajbozarth

@tgeorgeux tgeorgeux merged commit 4538bf5 into jupyterlab:master Feb 15, 2020
@ajbozarth ajbozarth deleted the close-dialog branch February 15, 2020 02:47
@jasongrout jasongrout added this to the 2.0 milestone Feb 24, 2020
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Mar 27, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg:apputils status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to close modal/dialogue boxes by clicking outside of them.
3 participants