mirror of
https://ark.sudovanilla.org/Korbs/electron-tabs.git
synced 2024-12-23 03:53:53 +00:00
Activate on mousedown (dragula compatibility)
This commit is contained in:
parent
d4e6d471b2
commit
6428039463
13
index.js
13
index.js
|
@ -266,15 +266,22 @@ const TabPrivate = {
|
|||
},
|
||||
|
||||
initTabClickHandler: function () {
|
||||
// Click
|
||||
const tabClickHandler = function (e) {
|
||||
if (this.isClosed) return;
|
||||
if (e.which === 1) {
|
||||
this.activate();
|
||||
} else if (e.which === 2) {
|
||||
if (e.which === 2) {
|
||||
this.close();
|
||||
}
|
||||
};
|
||||
this.tab.addEventListener("click", tabClickHandler.bind(this), false);
|
||||
// Mouse down
|
||||
const tabMouseDownHandler = function (e) {
|
||||
if (this.isClosed) return;
|
||||
if (e.which === 1) {
|
||||
this.activate();
|
||||
}
|
||||
};
|
||||
this.tab.addEventListener("mousedown", tabMouseDownHandler.bind(this), false);
|
||||
},
|
||||
|
||||
initWebview: function () {
|
||||
|
|
Loading…
Reference in a new issue