Change:
VSCode Version:1.6.1 OS Version:Windows 10 Pro x64 Steps to Reproduce: left sidebar on file item with middle mouse button be nice if it opened those files in new tabs
I just tried this with Sublime and it just seems to open the file like a normal left click. Would you expect in this case to not open the file in preview mode but pinned as real tab? Is that the difference to normal left click?
in my case when I click on a file in sidebar in most cases the file that opens reuses the active tab, that's what I'd like to avoid, if possible with middle click.
right, you know that you can configure this via
didm't know that, thanks, and sorry for the noise
I still think we should do something on middle mouse, even if we just open a file. Currently we seem to do nothing.
This actually applies to all our trees, not just the explorer. I think we should be consistent and support this for any tree. I like the idea of pinning the file when opening like that. This is something where contributors could chime in for a PR
I would like to work on this issue. As I am new to the project would appreciate any help. Here are some questions to start with: I've noticed that Search and Changes viewlets use 'selection' event instead of 'click','mousedown' events used by Debug, Explorer to open editor. Is it intented choice or we should try to be consistent across all the Trees? I would expect Expand/Collapse to still happen on middle mouse click. What do you think? Extensions seems to not support pin at all. Don't know if it's only on my version/environment. Opened an issue I've seen a comment in where we do not handle middle button event: "Give contents of the item a chance to handle this (e.g. open link in new tab)". I wonder if it's still a valid comment. I'm on Windows and i'm wondering if we expect the same behavior on Mac or we should have some Mac-specific treatment of middle button (Command button or smth?) Thanks.
I think middle-click should be translated into a selection event from the tree so that down stream components do not have to do anything special. I also think middle click should not opened pinned, but just normal. Can you explain? I would try to convert it to a selection event and see how that behaves. I am fine with making this work the same on all OS.
: Sorry my comment about Extensions was actually referring . Specifically you cannot open more than one editor tab with extension. Submitter a PR fix for this issue. Thanks.

Discussion:
} public onMouseDown(tree: _.ITree, element: any, event: mouse.IMouseEvent, origin: string = 'mouse'): boolean { <del> if (this.options.clickBehavior === ClickBehavior.ON_MOUSE_DOWN && event.leftButton) { </del> <ins> if (this.options.clickBehavior === ClickBehavior.ON_MOUSE_DOWN && (event.leftButton || event.middleButton)) { </ins> if (event.target) { if (event.target.tagName && event.target.tagName.toLowerCase() === 'input') { return false; // Ignore event if target is a form input field (avoids browser specific issues)

return false; } <del> if (event.middleButton) { return false; // Give contents of the item a chance to handle this (e.g. open link in new tab) } </del> if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') { return false; // Ignore event if target is a form input field (avoids browser specific issues) } <del> if (this.options.clickBehavior === ClickBehavior.ON_MOUSE_DOWN && event.leftButton) { </del> <ins> if (this.options.clickBehavior === ClickBehavior.ON_MOUSE_DOWN && (event.leftButton || event.middleButton)) { </ins> return false; // Already handled by onMouseDown }