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

Make Tabs closable by mouseclick. Closes #778 #779

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

frixxx
Copy link
Contributor

@frixxx frixxx commented Oct 25, 2023

Make Tabs closable by mouseclick.

Description

If a user clicks on a tab with a mouse button other then the primary one -> Close the corresponding tab.

Contribution Checklist:

  • [/] The pull request only addresses one issue or adds one feature.
  • [/] The pull request does not introduce any breaking changes
  • [/] I have added screenshots or gifs to help explain the change if applicable.
  • [/] I have read the contribution guidelines.
  • [/] Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Make Tabs closable by mouseclick.
@helloanoop helloanoop merged commit 7fbd8f0 into usebruno:main Oct 25, 2023
@helloanoop
Copy link
Contributor

Welcome @frixxx !

Thanks for taking care of this. Merged !!

@martinsefcik
Copy link
Contributor

martinsefcik commented Oct 25, 2023

@helloanoop
I wouldn't merge it as I wouldn't expect that I close tab with the right click. More standard way is to open some context menu with right click and not close tab.
Also it ignores if there are any unsaved changes in request and close tab without any warning/confirmation dialog.

I think there is better PR #586 which implemented closing tabs with middle click and shows confirmation when there are unsaved changes.

@helloanoop
Copy link
Contributor

Ah. Thanks for callout @martinsefcik

I thought the auxClick just handles the middle click. We clearly shouldn't close the tab on right click.

@helloanoop
Copy link
Contributor

helloanoop commented Oct 25, 2023

@martinsefcik Can you check again, my quick check on the internet says that auxClick does not get triggered for right click on the mouse.

Either we way, we need to show the confirmation popup if there are unsaved changes.

@martinsefcik
Copy link
Contributor

@helloanoop I was trying it before I wrote this first comment and I was able to close it with right click and without confirmation when there are unsaved changes. At least on Win it is behaving like this.

@helloanoop
Copy link
Contributor

Thanks @martinsefcik I have reverted the PR.

@frixxx
Copy link
Contributor Author

frixxx commented Oct 26, 2023

Thanks for calling out @martinsefcik .
I didn't see that this also applies for right clicks either. So you're absolutely right.

Thanks @helloanoop for doing this project. Out of the need i landed at Bruno, and like it better then every api client tool i used before. I hope i can contribute again in the future.

@DaPutzy
Copy link
Contributor

DaPutzy commented Oct 26, 2023

I would expect only the middle mouse button to close a tab and i would expect to be asked when there are unsaved changes :)

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.

4 participants