GlFormGroup description slot inside GlModal disappears second time GlModal appears
Summary
When you open the modal for the first time, the description appears in the <gl-form-group>. However, when you hit "Cancel" or "OK" and then open the modal again, the description disappears.
Note that this only happens when using <template #description> to populate the description. Everything works as expected when using description="Hello world" or :description="'Hello world'".
Steps to reproduce
- Paste the example code into any Vue application in GitLab
- Click "Open Modal"
- See the "Hello world" description
- Click "OK" or "Cancel"
- Click "Open Modal" again
- See that "Hello world" is gone
Example Project
Reproducing code:
<gl-link v-gl-modal-directive="'my-modal'">Open Modal</gl-link>
<gl-modal modal-id="my-modal">
<gl-form-group>
<template #description>Hello world</template>
<gl-form-input v-model="stuff"/>
</gl-form-group>
</gl-modal>
What is the current bug behavior?
Description disappears on opening modal for the second time.
What is the expected correct behavior?
Description is present no matter how many times the modal is opened.
Relevant logs and/or screenshots
Opening modal for the first time:
Opening modal subsequent times:
Typing input into the text field causes a re-render:
Possible fixes
The description renders properly when you type input into the text field, but only if it has the v-model.


