Skip to content

Commit 864e3d5

Browse files
authored
🐛 fix: fixed the topic link dropdown error (#10408)
* fix: fixed the topic link jump problem * fix: delete console.log
1 parent d77288f commit 864e3d5

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/TopicContent.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
9797
},
9898
...(isDesktop
9999
? [
100-
{
101-
icon: <Icon icon={ExternalLink} />,
102-
key: 'openInNewWindow',
103-
label: t('actions.openInNewWindow'),
104-
onClick: () => {
105-
openTopicInNewWindow(activeId, id);
106-
},
100+
{
101+
icon: <Icon icon={ExternalLink} />,
102+
key: 'openInNewWindow',
103+
label: t('actions.openInNewWindow'),
104+
onClick: () => {
105+
openTopicInNewWindow(activeId, id);
107106
},
108-
]
107+
},
108+
]
109109
: []),
110110
{
111111
type: 'divider',
@@ -237,6 +237,7 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
237237
className="topic-more"
238238
icon={MoreVertical}
239239
onClick={(e) => {
240+
e.preventDefault();
240241
e.stopPropagation();
241242
}}
242243
size={'small'}

src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ const TopicItem = memo<ConfigCellProps>(({ title, active, id, fav, threadId }) =
6767
<Flexbox style={{ position: 'relative' }}>
6868
<Link
6969
onClick={(e) => {
70+
if (e.button === 0 && (e.metaKey || e.ctrlKey)) {
71+
return;
72+
}
7073
e.preventDefault();
7174
toggleTopic(id);
7275
toggleConfig(false);

0 commit comments

Comments
 (0)