ConfirmPopup transition fixes
parent
290b8e1335
commit
4053842c40
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<Portal>
|
<Portal>
|
||||||
<transition name="p-confirm-popup" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
<transition name="p-confirmpopup" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
||||||
<div v-if="visible" :ref="containerRef" v-focustrap role="alertdialog" :class="cx('root')" :aria-modal="visible" @click="onOverlayClick" @keydown="onOverlayKeydown" v-bind="ptmi('root')">
|
<div v-if="visible" :ref="containerRef" v-focustrap role="alertdialog" :class="cx('root')" :aria-modal="visible" @click="onOverlayClick" @keydown="onOverlayKeydown" v-bind="ptmi('root')">
|
||||||
<slot v-if="$slots.container" name="container" :message="confirmation" :onAccept="accept" :onReject="reject" :acceptCallback="accept" :rejectCallback="reject"></slot>
|
<slot v-if="$slots.container" name="container" :message="confirmation" :onAccept="accept" :onReject="reject" :acceptCallback="accept" :rejectCallback="reject"></slot>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
@ -207,8 +207,8 @@ export default {
|
||||||
this.container.style.setProperty($dt('overlay.arrow.left').name, `${arrowLeft}px`);
|
this.container.style.setProperty($dt('overlay.arrow.left').name, `${arrowLeft}px`);
|
||||||
|
|
||||||
if (containerOffset.top < targetOffset.top) {
|
if (containerOffset.top < targetOffset.top) {
|
||||||
this.container.setAttribute('data-p-confirm-popup-flipped', 'true');
|
this.container.setAttribute('data-p-confirmpopup-flipped', 'true');
|
||||||
!this.isUnstyled && DomHandler.addClass(this.container, 'p-confirm-popup-flipped');
|
!this.isUnstyled && DomHandler.addClass(this.container, 'p-confirmpopup-flipped');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
bindOutsideClickListener() {
|
bindOutsideClickListener() {
|
||||||
|
|
Loading…
Reference in New Issue