We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 551cde0 + 9f48e50 commit 6b812b2Copy full SHA for 6b812b2
js/navbar/navbarTabs.js
@@ -260,10 +260,9 @@ function createTabElement(data) {
260
261
//click to enter edit mode or switch to a tab
262
tabEl.addEventListener("click", function (e) {
263
- var tabId = this.getAttribute("data-tab");
264
-
265
- //if the tab isn't focused
266
- if (tabs.getSelected() != data.id) {
+ if (e.which == 2) { // if mouse middle click -> close tab
+ closeTab(data.id);
+ } else if (tabs.getSelected() != data.id) { // else switch to tab if it isn't focused
267
switchToTab(data.id);
268
} else { //the tab is focused, edit tab instead
269
enterEditMode(data.id);
0 commit comments