I am experiencing an issue with a component that has an input which, when clicked, opens a modal. The problem arises when I place this component inside a div with a relative position - the modal does not display correctly. To resolve this, I need to ensure that the HTML for the modal is placed outside of the div with a relative position.
It is crucial that my component includes both the input and the modal, as it will be used multiple times within another component.
<div class="position-relative">
<MyOwnComponet />
</div>
<div class="position-relative">
<MyOwnComponet />
</div>
The structure of my component would look something like this:
<template>
<input @click="showModal = true" />
<div class="modal" v-if="showModal">
...
</div>
</template>