From 61ef03da00f2422ad4c6eb3d30d43dbcdc6f420a Mon Sep 17 00:00:00 2001 From: oxdc <29519076+oxdc@users.noreply.github.com> Date: Sun, 1 Sep 2024 17:36:24 +0800 Subject: [PATCH] fixed #24 --- manifest.json | 2 +- src/components/NavigationTreeItem.tsx | 4 +++- src/components/Tab.tsx | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 85365e8..6666c4b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "vertical-tabs", "name": "Vertical Tabs", - "version": "0.6.7", + "version": "0.6.8", "minAppVersion": "1.6.2", "description": "Offer an alternative view that displays open tabs vertically, allowing users to group and organize tabs for a better navigation experience.", "author": "oxdc", diff --git a/src/components/NavigationTreeItem.tsx b/src/components/NavigationTreeItem.tsx index 056d4c8..b4bd0e1 100644 --- a/src/components/NavigationTreeItem.tsx +++ b/src/components/NavigationTreeItem.tsx @@ -20,7 +20,8 @@ interface NavigationTreeItemProps { isHighlighted?: boolean; children?: React.ReactNode; toolbar?: React.ReactNode; - onClick?: (event: React.MouseEvent) => void; + onClick?: (event?: React.MouseEvent) => void; + onTouchEnd?: (event: React.TouchEvent) => void; onAuxClick?: (event: React.MouseEvent) => void; onDoubleClick?: ( event: React.MouseEvent @@ -85,6 +86,7 @@ export const NavigationTreeItem = (props: NavigationTreeItemProps) => {
{ {...props} toolbar={toolbar} onClick={activeOrCloseTab} + onTouchEnd={openTab} onAuxClick={midClickCloseTab} onDoubleClick={closeTab} onContextMenu={(e) => menu.showAtMouseEvent(e.nativeEvent)}