This commit is contained in:
SPRINX0\prochazka
2024-11-18 17:03:06 +01:00
parent e64cfce423
commit c7ef4b9231

View File

@@ -336,6 +336,12 @@
setSelectedTab(tabid); setSelectedTab(tabid);
}; };
const handleMouseDown = (e, tabid) => {
if (e.button == 1) {
e.preventDefault();
}
};
const handleMouseUp = (e, tabid) => { const handleMouseUp = (e, tabid) => {
if (e.button == 1) { if (e.button == 1) {
e.preventDefault(); e.preventDefault();
@@ -563,6 +569,7 @@
? tab.tabid == $draggingTabTarget?.tabid ? tab.tabid == $draggingTabTarget?.tabid
: tab.tabid == shownTab?.tabid} : tab.tabid == shownTab?.tabid}
on:click={e => handleTabClick(e, tab.tabid)} on:click={e => handleTabClick(e, tab.tabid)}
on:mousedown={e => handleMouseDown(e, tab.tabid)}
on:mouseup={e => handleMouseUp(e, tab.tabid)} on:mouseup={e => handleMouseUp(e, tab.tabid)}
use:contextMenu={getContextMenu(tab)} use:contextMenu={getContextMenu(tab)}
draggable={true} draggable={true}