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
Merged

Conversation

ajbozarth
Copy link
Contributor

@ajbozarth ajbozarth commented Feb 14, 2020

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

@jupyterlab-dev-mode jupyterlab-dev-mode bot commented Feb 14, 2020

Thanks for making a pull request to JupyterLab!

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

@ajbozarth ajbozarth requested a review from blink1073 Feb 14, 2020
@ajbozarth
Copy link
Contributor Author

@ajbozarth ajbozarth commented Feb 14, 2020

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

@jasongrout jasongrout commented Feb 14, 2020

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

@tgeorgeux tgeorgeux commented Feb 15, 2020

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

@tgeorgeux tgeorgeux merged commit 4538bf5 into jupyterlab:master Feb 15, 2020
10 checks passed
@ajbozarth ajbozarth deleted the close-dialog branch Feb 15, 2020
@jasongrout jasongrout added this to the 2.0 milestone Feb 24, 2020
@lock lock bot added the status:resolved-locked 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants