From cf66df10158cb3f101ea0a58487d45ae51c4870d Mon Sep 17 00:00:00 2001 From: Bangarraju-Microsoft Date: Wed, 14 May 2025 15:48:20 +0530 Subject: [PATCH] UI - Bug fix(#17658) --- src/frontend/src/components/Homepage/Cards.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/frontend/src/components/Homepage/Cards.tsx b/src/frontend/src/components/Homepage/Cards.tsx index 6cc3585b..488e2ac5 100644 --- a/src/frontend/src/components/Homepage/Cards.tsx +++ b/src/frontend/src/components/Homepage/Cards.tsx @@ -97,6 +97,17 @@ export const FeatureCard = (props: Props) => { export const TextFieldCard = ({ className, ...props }: CardProps) => { const appStateContext = React.useContext(AppStateContext); + const handleKeyDown = (event: React.KeyboardEvent) => { + if (event.key === 'Enter') { + if (appStateContext?.state.researchTopic?.trim()) { + appStateContext.dispatch({ + type: 'UPDATE_SIDEBAR_SELECTION', + payload: SidebarOptions.Article, + }); + } + } + }; + return ( { flex: 1, width: "100%", }} + onKeyDown={handleKeyDown} />