From 036675bb49f17fafe70862cbd6ff87f95f3304ef Mon Sep 17 00:00:00 2001 From: Luke Mino-Altherr Date: Wed, 4 Feb 2026 11:58:40 -0800 Subject: [PATCH] fix: Safari compatibility issues in Secrets panel dialog (#8610) ## Summary Fixes multiple Safari-specific issues in the Secrets panel dialog: 1. **Dropdown not opening** - Safari has issues with click events on portaled content inside dialogs. Added `disablePortal` prop to `SelectContent` to render content inline. 2. **Close button focused on open** - Added `autofocus` to `SelectTrigger` so focus goes to the first form field. 3. **Buttons not focusable** - Safari doesn't focus buttons on click by default. Added `tabindex="0"` to Cancel/Save buttons. ## Changes - `SelectContent.vue`: Added `disablePortal` prop with explanatory comment linking to upstream issue - `SecretFormDialog.vue`: Applied Safari workarounds ## References - https://github.com/chakra-ui/ark/issues/1782 (Portal issue in Safari) - https://mayank.co/blog/safari-focus/ (Button focus behavior) ## Summary by CodeRabbit * **New Features** * Added option to disable portal rendering in select components for greater control over component behavior. * **Bug Fixes** * Improved keyboard accessibility in form dialogs with enhanced focus management, auto-focus on select triggers, and optimized tab navigation for action buttons. Co-authored-by: Amp --- src/components/ui/select/SelectContent.vue | 13 +++++++++++-- .../secrets/components/SecretFormDialog.vue | 13 +++++++++---- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/components/ui/select/SelectContent.vue b/src/components/ui/select/SelectContent.vue index a88e26b9f..db1b705f3 100644 --- a/src/components/ui/select/SelectContent.vue +++ b/src/components/ui/select/SelectContent.vue @@ -20,9 +20,18 @@ defineOptions({ const { position = 'popper', + // Safari has issues with click events on portaled content inside dialogs. + // Set disablePortal to true when using Select inside a Dialog on Safari. + // See: https://github.com/chakra-ui/ark/issues/1782 + disablePortal = false, class: className, ...restProps -} = defineProps() +} = defineProps< + SelectContentProps & { + class?: HTMLAttributes['class'] + disablePortal?: boolean + } +>() const emits = defineEmits() const delegatedProps = computed(() => ({ @@ -34,7 +43,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)