From a396e8857b44c306d6f95ea0df4b057e3cc18812 Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Fri, 24 Mar 2023 13:31:30 -0700 Subject: [PATCH] refactor(alert): switch ev.code to ev.key (#27023) --- core/src/components/alert/alert.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/components/alert/alert.tsx b/core/src/components/alert/alert.tsx index c8d9a0b448..4b1d680a05 100644 --- a/core/src/components/alert/alert.tsx +++ b/core/src/components/alert/alert.tsx @@ -185,13 +185,13 @@ export class Alert implements ComponentInterface, OverlayInterface { // If hitting arrow down or arrow right, move to the next radio // If we're on the last radio, move to the first radio - if (['ArrowDown', 'ArrowRight'].includes(ev.code)) { + if (['ArrowDown', 'ArrowRight'].includes(ev.key)) { nextEl = index === radios.length - 1 ? radios[0] : radios[index + 1]; } // If hitting arrow up or arrow left, move to the previous radio // If we're on the first radio, move to the last radio - if (['ArrowUp', 'ArrowLeft'].includes(ev.code)) { + if (['ArrowUp', 'ArrowLeft'].includes(ev.key)) { nextEl = index === 0 ? radios[radios.length - 1] : radios[index - 1]; }