From 42a199043a4c073f63f7962164dd2b87ff2d8d74 Mon Sep 17 00:00:00 2001 From: David <33458145+davidmcpowell@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:57:57 +0200 Subject: [PATCH] Skip ReviewPanelEntry focus event if target is anchor element (#20928) GitOrigin-RevId: e6ad0ca7c03de2ef176b6328c27dd0afa10bd102 --- .../review-panel-new/components/review-panel-entry.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/web/frontend/js/features/review-panel-new/components/review-panel-entry.tsx b/services/web/frontend/js/features/review-panel-new/components/review-panel-entry.tsx index 021d7c9ce6..7a2d80dcc3 100644 --- a/services/web/frontend/js/features/review-panel-new/components/review-panel-entry.tsx +++ b/services/web/frontend/js/features/review-panel-new/components/review-panel-entry.tsx @@ -48,10 +48,11 @@ export const ReviewPanelEntry: FC<{ if ( event.target instanceof HTMLButtonElement || event.target instanceof HTMLLinkElement || - event.target instanceof HTMLTextAreaElement + event.target instanceof HTMLTextAreaElement || + event.target instanceof HTMLAnchorElement ) { - // Don't focus if the click was on a button/link/textarea as we don't want - // affect the behaviour of the button/link/textarea + // Don't focus if the click was on a button/link/textarea/anchor as we + // don't want to affect the behaviour of the button/link/textarea/anchor return }