vue-strap icon indicating copy to clipboard operation
vue-strap copied to clipboard

v-select does not auto-close after losing focus when rendered on a v-modal

Open dschreij opened this issue 7 years ago • 3 comments

I am bumping into the peculiar situation that v-selects rendered inside a modal (I use the modal vue-strap component) do not close automatically if they lose focus, by for instance selecting another form/v-select element. This way you end up with multiple v-selects being in the expanded state at the same time, often overlapping each other. The only way to close the v-select again is by clicking its box. This doesn't happen when rendering v-selects in other floating components, such as <asides>. What could be going wrong here?

dschreij avatar Jul 12 '17 16:07 dschreij

I think this goes for all components, as we have the same issue with DatePicker :(

fourpixels avatar Sep 04 '17 16:09 fourpixels

I bet it's because of this line: https://github.com/wffranco/vue-strap/blob/master/src/Modal.vue#L3

<div
    :class="['modal-dialog',{'modal-lg':large,'modal-sm':small}]"
    role="document"
    :style="{width: optionalWidth}"
    @click.stop="action(null)"
>

action called with null just returns, so clicking anywhere inside the modal on something that doesn't have click listener itself just stops the event! Why?!

fourpixels avatar Sep 04 '17 19:09 fourpixels

@wffranco Any ideas?

fourpixels avatar Sep 15 '17 07:09 fourpixels