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 correct tab with Close Tab #8529

Merged
merged 1 commit into from Jun 8, 2020
Merged

Conversation

ianhi
Copy link
Contributor

@ianhi ianhi commented Jun 7, 2020

References

Fixes: #8509

Right clicking to close a tab will now close the tab that was clicked on even if two tabs share a name. The keyboard shortcut behavior is maintained.

closing-correct-tab
closing-preview
closing-keyboard-shortcut

Code changes

Use contextMenuWidget to determine which tab to close in the Close Tab command. This function falls back to the active widget if there is no context menu active so the keyborad shortcut behavior is maintained.

User-facing changes

Right click to close tab will now always close the tab that was clicked on.

Backwards-incompatible changes

Yes? This can change the effect of the close tab command. But i'm not sure if that counts as part of the API, and also it is fixing a bug so maybe no?

maintains the same keyboard shortcut behavior, results in correct tab being closed from context menu when multiple tabs have the same name
@jupyterlab-dev-mode
Copy link

jupyterlab-dev-mode bot commented Jun 7, 2020

Thanks for making a pull request to JupyterLab!

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

Copy link
Member

@blink1073 blink1073 left a comment

Love it, thanks!

@blink1073 blink1073 added this to the 2.2 milestone Jun 8, 2020
@blink1073 blink1073 merged commit 1df0e18 into jupyterlab:master Jun 8, 2020
39 checks passed
saulshanabrook pushed a commit that referenced this issue Jun 25, 2020
Close correct tab with Close Tab
@ianhi ianhi deleted the close-tab branch Jul 19, 2020
@github-actions github-actions bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 7, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg:application 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.

2 participants