setup() {
const isOpenRef = ref(false);
// const event = ref(); I removed this line
function setOpen (state) {
//event.value = event; I removed this line
isOpenRef.value = state;
}
return { isOpenRef, setOpen}
}
Since you are not setting the event in setOpen, ion-popover does not have access to that event for positioning, so it will place the popover in the middle of the screen by default.