Skip to content

Commit

Permalink
fix: middle button click to close - SpecialTab and RequestTabNotFound…
Browse files Browse the repository at this point in the history
… tab (usebruno#3044)
  • Loading branch information
Pragadesh-45 authored and Its-treason committed Sep 11, 2024
1 parent 9458c2e commit 28848de
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ const RequestTab = ({ tab, collection, tabIndex, collectionRequestTabs, folderUi

const handleMouseUp = (e) => {
if (e.button === 1) {
e.stopPropagation();
e.preventDefault();
e.stopPropagation();

// Close the tab
dispatch(
closeTabs({
tabUids: [tab.uid]
Expand All @@ -59,6 +60,7 @@ const RequestTab = ({ tab, collection, tabIndex, collectionRequestTabs, folderUi
>
<StyledWrapper
onContextMenu={handleRightClick}
onMouseUp={handleMouseUp}
className="flex items-center justify-between tab-container px-1"
>
{tab.type === 'folder-settings' ? (
Expand Down Expand Up @@ -86,6 +88,7 @@ const RequestTab = ({ tab, collection, tabIndex, collectionRequestTabs, folderUi
>
<StyledWrapper
onContextMenu={handleRightClick}
onMouseUp={handleMouseUp}
className="flex items-center justify-between tab-container px-1"
>
<RequestTabNotFound handleCloseClick={handleCloseClick} />
Expand Down

0 comments on commit 28848de

Please sign in to comment.