diff --git a/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js b/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js index b6c8ce693..a067e9876 100644 --- a/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js +++ b/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js @@ -28,6 +28,19 @@ const RequestTab = ({ tab, collection }) => { ); }; + const handleMouseUp = (e) => { + if (e.button === 1) { + e.stopPropagation(); + e.preventDefault(); + + dispatch( + closeTabs({ + tabUids: [tab.uid] + }) + ); + } + }; + const getMethodColor = (method = '') => { const theme = storedTheme === 'dark' ? darkTheme : lightTheme; @@ -124,7 +137,18 @@ const RequestTab = ({ tab, collection }) => { }} /> )} -
+
{ + if (!item.draft) return handleMouseUp(e); + + if (e.button === 1) { + e.stopPropagation(); + e.preventDefault(); + setShowConfirmClose(true); + } + }} + > {method}