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

Can't close tab with middle mouse click when mouse is over the close button #63431

Closed
xchrdw opened this issue Nov 19, 2018 · 12 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@xchrdw
Copy link

xchrdw commented Nov 19, 2018

  • VSCode Version: 1.29.0
  • OS Version: Linux

Steps to Reproduce:

  1. Try to close multiple tabs with middle mouse click
  2. Due to varying tab length, the mouse will at some point be over the close button of a tab
  3. Tabs can't be closed when the mouse is over the close button ('x')

Does this issue occur when all extensions are disabled?: Yes

@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Nov 20, 2018
@bpasero bpasero added this to the November 2018 milestone Nov 20, 2018
@bpasero bpasero added the help wanted Issues identified as good community contribution opportunities label Nov 20, 2018
@bpasero
Copy link
Member

bpasero commented Nov 20, 2018

If someone wants to fix this, be my guest.

@JohanssonDaniel
Copy link

Hi @bpasero can I take a look at this?

@bpasero
Copy link
Member

bpasero commented Nov 20, 2018

@JohanssonDaniel sure go ahead, my guess would be somewhere in tabsTitleControl.ts

@JohanssonDaniel
Copy link

@bpasero Okay, I will start to look there

@bpasero
Copy link
Member

bpasero commented Nov 24, 2018

Looks like this is caused by the check for e.button === 1 /* Middle Button*/ && !this.originatesFromTabActionBar(e) in tabsTitleControl.ts which was added for 35a12c9 but I cannot reproduce that issue anymore (possibly due to the e.stopPropagation() right after which we did not have back in the days).

@bpasero
Copy link
Member

bpasero commented Nov 24, 2018

Unfortunately I can still reproduce the issue on Windows when I remove that check so the solution has to solve both issues...

@bpasero bpasero removed this from the November 2018 milestone Nov 24, 2018
@JohanssonDaniel
Copy link

Hi @bpasero! I have tried to reproduce the issue you mentioned by removing the !this.originatesFromTabActionBar(e) check without success on both of my windows machines with two different mouses. Without the check, I am able to close a single tab by clicking with the middle mouse button on the x icon (and also anywhere else on the tab) without closing the tab to the right.

With check
Alt Text

Without check
Alt Text

Since I am not able to reproduce it, it might be a good idea if someone else can work on it instead. It might also be a good idea to check with other mouses since I know from my own experience that the middle mouse button might become faulty and randomly perform double clicks. I did a quick google search and it seems to be a common enough problem that it might be worth looking into 👍

@bpasero
Copy link
Member

bpasero commented Nov 28, 2018

@JohanssonDaniel did you try on Windows?

@JohanssonDaniel
Copy link

Yes, I tried it on two computers running windows.

@xqin
Copy link

xqin commented Dec 3, 2018

I have same issue on Mac/Windows VSCode.

can not close file when i use middle key click close button on the tab.

Mac:

Version 1.29.1 (1.29.1)

bc24f98b5f70467bc689abf41cc5550ca637088e

2018-11-15T18:59:37.244Z

Windows:

Version: 1.29.1 (user setup)
Commit: bc24f98b5f70467bc689abf41cc5550ca637088e
Date: 2018-11-15T19:13:36.375Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

@bpasero bpasero removed the help wanted Issues identified as good community contribution opportunities label Dec 3, 2018
@bpasero bpasero added this to the November 2018 milestone Dec 3, 2018
@bpasero
Copy link
Member

bpasero commented Dec 3, 2018

I think the fix is actually fine, what I saw seems to be a feature of my mouse where when I press the middle mouse button hard enough it will actually fire MOUSE_UP events periodically. We have to be on the watch out for users reporting a regression though.

@bpasero bpasero closed this as completed in 08d8cc1 Dec 3, 2018
@sbatten sbatten added the verified Verification succeeded label Dec 7, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants
@bpasero @xchrdw @xqin @sbatten @JohanssonDaniel and others