Skip to content

Commit 3242316

Browse files
authored
fix(ui): auto-profile-hover-on-history-view (#3368)
1 parent 1a5c3eb commit 3242316

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/components/modal/ModalContainer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function handleFavouritedBoostedByClose() {
8282
>
8383
<ModalMediaPreview v-if="isMediaPreviewOpen" @close="closeMediaPreview()" />
8484
</ModalDialog>
85-
<ModalDialog v-model="isEditHistoryDialogOpen" max-w-125>
85+
<ModalDialog v-model="isEditHistoryDialogOpen" :focus-first-element="false" max-w-125>
8686
<StatusEditPreview v-if="statusEdit" :edit="statusEdit" />
8787
</ModalDialog>
8888
<ModalDialog v-model="isCommandPanelOpen" max-w-fit flex>

app/components/modal/ModalDialog.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const {
1010
closeByMask = true,
1111
useVIf = true,
1212
keepAlive = false,
13+
focusFirstElement = true,
1314
} = defineProps<{
1415
// level of depth
1516
zIndex?: number
@@ -21,6 +22,8 @@ const {
2122
keepAlive?: boolean
2223
// The aria-labelledby id for the dialog.
2324
dialogLabelledBy?: string
25+
// Whether to focus on the first element when the modal opens.
26+
focusFirstElement?: boolean
2427
}>()
2528
2629
const emit = defineEmits<{
@@ -45,6 +48,7 @@ const { activate } = useFocusTrap(elDialogRoot, {
4548
escapeDeactivates: true,
4649
preventScroll: true,
4750
returnFocusOnDeactivate: true,
51+
initialFocus: focusFirstElement ? undefined : false,
4852
})
4953
5054
defineExpose({

0 commit comments

Comments
 (0)