Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: fixed the topic link dropdown error (#10408)

Shinji-Li864e3d5aa381
diff --git a/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/TopicContent.tsx b/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/TopicContent.tsx
index d83f95915b5..0efeefdfa63 100644
--- a/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/TopicContent.tsx
+++ b/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/TopicContent.tsx
@@ -97,15 +97,15 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
},
...(isDesktop
? [
- {
- icon: <Icon icon={ExternalLink} />,
- key: 'openInNewWindow',
- label: t('actions.openInNewWindow'),
- onClick: () => {
- openTopicInNewWindow(activeId, id);
- },
+ {
+ icon: <Icon icon={ExternalLink} />,
+ key: 'openInNewWindow',
+ label: t('actions.openInNewWindow'),
+ onClick: () => {
+ openTopicInNewWindow(activeId, id);
},
- ]
+ },
+ ]
: []),
{
type: 'divider',
@@ -237,6 +237,7 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
className="topic-more"
icon={MoreVertical}
onClick={(e) => {
+ e.preventDefault();
e.stopPropagation();
}}
size={'small'}
diff --git a/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/index.tsx b/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/index.tsx
index 5f1abefcf26..3c141437cc4 100644
--- a/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/index.tsx
+++ b/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/index.tsx
@@ -67,6 +67,9 @@ const TopicItem = memo<ConfigCellProps>(({ title, active, id, fav, threadId }) =
<Flexbox style={{ position: 'relative' }}>
<Link
onClick={(e) => {
+ if (e.button === 0 && (e.metaKey || e.ctrlKey)) {
+ return;
+ }
e.preventDefault();
toggleTopic(id);
toggleConfig(false);