Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/primefaces/primevue
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Nov 13, 2024
2 parents 71f2e0b + c4740ac commit 4f8127c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/primevue/src/autocomplete/AutoComplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export default {
this.show();
this.focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
this.searching = false;
!this.showEmptyMessage && this.visibleOptions.length === 0 && this.hide();
}
this.autoUpdateModel();
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/drawer/Drawer.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<Portal>
<div v-if="containerVisible" :ref="maskRef" @mousedown="onMaskClick" :class="cx('mask')" :style="sx('mask', true, { position })" v-bind="ptm('mask')">
<div v-if="containerVisible" :ref="maskRef" @mousedown="onMaskClick" :class="cx('mask')" :style="sx('mask', true, { position, modal })" v-bind="ptm('mask')">
<transition name="p-drawer" @enter="onEnter" @after-enter="onAfterEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear v-bind="ptm('transition')">
<div v-if="visible" :ref="containerRef" v-focustrap :class="cx('root')" role="complementary" :aria-modal="modal" v-bind="ptmi('root')">
<div v-if="visible" :ref="containerRef" v-focustrap :class="cx('root')" :style="sx('root')" role="complementary" :aria-modal="modal" v-bind="ptmi('root')">
<slot v-if="$slots.container" name="container" :closeCallback="hide"></slot>
<template v-else>
<div :ref="headerContainerRef" :class="cx('header')" v-bind="ptm('header')">
Expand Down
11 changes: 7 additions & 4 deletions packages/primevue/src/drawer/style/DrawerStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const theme = ({ dt }) => `
.p-drawer {
display: flex;
flex-direction: column;
pointer-events: auto;
transform: translate3d(0px, 0px, 0px);
position: relative;
transition: transform 0.3s;
Expand Down Expand Up @@ -120,16 +119,20 @@ const theme = ({ dt }) => `
`;

const inlineStyles = {
mask: ({ position }) => ({
mask: ({ position, modal }) => ({
position: 'fixed',
height: '100%',
width: '100%',
left: 0,
top: 0,
display: 'flex',
justifyContent: position === 'left' ? 'flex-start' : position === 'right' ? 'flex-end' : 'center',
alignItems: position === 'top' ? 'flex-start' : position === 'bottom' ? 'flex-end' : 'center'
})
alignItems: position === 'top' ? 'flex-start' : position === 'bottom' ? 'flex-end' : 'center',
pointerEvents: modal ? 'auto' : 'none'
}),
root: {
pointerEvents: 'auto'
}
};

const classes = {
Expand Down

0 comments on commit 4f8127c

Please sign in to comment.