From afd3953cdd90d342359775b91126667be2ff6fbd Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 12 Sep 2024 15:15:05 +0200 Subject: [PATCH] [Glitch] Autofocus primary button in modals Port 5f782f9629de25a2029fbc75d79316d583adc9a0 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/features/ui/components/block_modal.jsx | 2 +- .../ui/components/confirmation_modals/confirmation_modal.tsx | 5 ++++- .../glitch/features/ui/components/domain_block_modal.jsx | 2 +- .../flavours/glitch/features/ui/components/mute_modal.jsx | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/features/ui/components/block_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/block_modal.jsx index fa772b067d..a5ee7bfa4f 100644 --- a/app/javascript/flavours/glitch/features/ui/components/block_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/block_modal.jsx @@ -99,7 +99,7 @@ export const BlockModal = ({ accountId, acct }) => { - diff --git a/app/javascript/flavours/glitch/features/ui/components/confirmation_modals/confirmation_modal.tsx b/app/javascript/flavours/glitch/features/ui/components/confirmation_modals/confirmation_modal.tsx index 429850ef32..6b5b5ca3ca 100644 --- a/app/javascript/flavours/glitch/features/ui/components/confirmation_modals/confirmation_modal.tsx +++ b/app/javascript/flavours/glitch/features/ui/components/confirmation_modals/confirmation_modal.tsx @@ -79,7 +79,10 @@ export const ConfirmationModal: React.FC< /> - + {/* eslint-disable-next-line jsx-a11y/no-autofocus -- we are in a modal and thus autofocusing is justified */} + diff --git a/app/javascript/flavours/glitch/features/ui/components/domain_block_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/domain_block_modal.jsx index b1ab81dab5..8b06389179 100644 --- a/app/javascript/flavours/glitch/features/ui/components/domain_block_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/domain_block_modal.jsx @@ -88,7 +88,7 @@ export const DomainBlockModal = ({ domain, accountId, acct }) => { - diff --git a/app/javascript/flavours/glitch/features/ui/components/mute_modal.jsx b/app/javascript/flavours/glitch/features/ui/components/mute_modal.jsx index f94adbd858..e208f12173 100644 --- a/app/javascript/flavours/glitch/features/ui/components/mute_modal.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/mute_modal.jsx @@ -137,7 +137,7 @@ export const MuteModal = ({ accountId, acct }) => { -