Skip ReviewPanelEntry focus event if target is anchor element (#20928)

GitOrigin-RevId: e6ad0ca7c03de2ef176b6328c27dd0afa10bd102
This commit is contained in:
David 2024-10-10 14:57:57 +02:00 committed by Copybot
parent def2f7f4fd
commit 42a199043a

View file

@ -48,10 +48,11 @@ export const ReviewPanelEntry: FC<{
if ( if (
event.target instanceof HTMLButtonElement || event.target instanceof HTMLButtonElement ||
event.target instanceof HTMLLinkElement || 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 // Don't focus if the click was on a button/link/textarea/anchor as we
// affect the behaviour of the button/link/textarea // don't want to affect the behaviour of the button/link/textarea/anchor
return return
} }