diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js index a20de70ea..e7a3a21ea 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js @@ -217,6 +217,12 @@ const CollectionItem = ({ item, collectionUid, collectionPathname, searchText }) ); }; + // prevent the parent's double-click handler from firing + const handleFolderDoubleClick = (e) => { + e.stopPropagation(); + e.preventDefault(); + }; + const handleRightClick = (event) => { const _menuDropdown = dropdownTippyRef.current; if (_menuDropdown) { @@ -358,6 +364,7 @@ const CollectionItem = ({ item, collectionUid, collectionPathname, searchText }) className={iconClassName} style={{ color: 'rgb(160 160 160)' }} onClick={handleFolderCollapse} + onDoubleClick={handleFolderDoubleClick} /> ) : null} diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js index 404258d8d..4b787fc3d 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js @@ -111,6 +111,12 @@ const Collection = ({ collection, searchText }) => { dispatch(toggleCollection(collection.uid)); } + // prevent the parent's double-click handler from firing + const handleCollectionDoubleClick = (e) => { + e.stopPropagation(); + e.preventDefault(); + }; + const handleRightClick = (event) => { const _menuDropdown = menuDropdownTippyRef.current; if (_menuDropdown) { @@ -223,6 +229,7 @@ const Collection = ({ collection, searchText }) => { className={`chevron-icon ${iconClassName}`} style={{ width: 16, minWidth: 16, color: 'rgb(160 160 160)' }} onClick={handleCollectionCollapse} + onDoubleClick={handleCollectionDoubleClick} />