Merge pull request #35 from navedqb/fix-5770

fix: focus trap issue in Inplace
pull/5772/head
navedqb 2024-05-23 11:08:08 +05:30 committed by GitHub
commit 62b5493937
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1,9 +1,9 @@
<template> <template>
<div v-focustrap :class="cx('root')" aria-live="polite" v-bind="ptmi('root')"> <div :class="cx('root')" aria-live="polite" v-bind="ptmi('root')">
<div v-if="!d_active" ref="display" :class="cx('display')" :tabindex="$attrs.tabindex || '0'" role="button" @click="open" @keydown.enter="open" v-bind="{ ...displayProps, ...ptm('display') }"> <div v-if="!d_active" ref="display" :class="cx('display')" :tabindex="$attrs.tabindex || '0'" role="button" @click="open" @keydown.enter="open" v-bind="{ ...displayProps, ...ptm('display') }">
<slot name="display"></slot> <slot name="display"></slot>
</div> </div>
<div v-else :class="cx('content')" v-bind="ptm('content')"> <div v-else v-focustrap :class="cx('content')" v-bind="ptm('content')">
<slot name="content"></slot> <slot name="content"></slot>
<IPButton v-if="closable" :aria-label="closeAriaLabel" @click="close" :unstyled="unstyled" :pt="ptm('closeButton')" v-bind="closeButtonProps"> <IPButton v-if="closable" :aria-label="closeAriaLabel" @click="close" :unstyled="unstyled" :pt="ptm('closeButton')" v-bind="closeButtonProps">
<template #icon> <template #icon>