Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<b-tabs> loss of <b-tab> control as of rc20 when used in modals #3361

Closed
rich25200 opened this issue May 23, 2019 · 7 comments · Fixed by #3375
Closed

<b-tabs> loss of <b-tab> control as of rc20 when used in modals #3361

rich25200 opened this issue May 23, 2019 · 7 comments · Fixed by #3375

Comments

@rich25200
Copy link

Describe the bug

If you put b-tabs inside of a modal, upon opening the modal for the first time everything works fine, but if you close the modal and reopen it, then the tabs don't work, it will be stuck on the content of the first tab, and switching tabs will not have any effect, instead the content of the first tab will remain visible. Reloading the page is the only way to get it to work again.

Steps to reproduce the bug

https://jsfiddle.net/gh9y7zLs/2/

Versions

Libraries:

  • BootstrapVue: 2.0.0-rc.20
  • Bootstrap: 4.0.0
  • Vue: 2.6.10

Environment:

  • Browser: All
@F-Node-Karlsruhe
Copy link

F-Node-Karlsruhe commented May 23, 2019

Just experienced the same after closing and reopening the modal.
First it works fine, but after reopening the modal, the tabs do not set the active props anymore.
(display: none and opacity 0 in tab content stays)

Here is some easy replication code.

<div>
<b-button v-b-modal.modal-1>Click</b-button>
<b-modal id="modal-1">
  <b-tabs content-class="mt-3">
    <b-tab title="First" active><p>I'm the first tab</p></b-tab>
    <b-tab title="Second"><p>I'm the second tab</p></b-tab>
  </b-tabs>
</b-modal>
</div>

@tmorehouse
Copy link
Member

Hmm... strange that this issue is back. will have to investigate. Confirmed in the latest dev branch as well

https://deploy-preview-3289--bootstrap-vue.netlify.com/

@tmorehouse tmorehouse self-assigned this May 23, 2019
@F-Node-Karlsruhe
Copy link

F-Node-Karlsruhe commented May 23, 2019 via email

@tmorehouse
Copy link
Member

For a workaround, set the static prop on <b-modal> and do not use the lazy prop.

@F-Node-Karlsruhe
Copy link

F-Node-Karlsruhe commented May 23, 2019 via email

@tmorehouse
Copy link
Member

@F-Node-Karlsruhe I didn't see that issue (modal popping up again on close) when I confirmed the issue and tried the static prop

@rich25200
Copy link
Author

Static prop is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment