Skip to content

Commit

Permalink
use fallback target.id - only scroll modal content (not the page)
Browse files Browse the repository at this point in the history
  • Loading branch information
negue committed Jul 1, 2018
1 parent c072935 commit f8d8d4f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions website/client/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ div
@import '~client/assets/scss/colors.scss';
/* @TODO: The modal-open class is not being removed. Let's try this for now */
.modal, .modal-open {
.modal {
overflow-y: scroll !important;
}
Expand Down Expand Up @@ -475,7 +475,14 @@ export default {
});
this.$root.$on('bv::modal::hidden', (bvEvent) => {
const modalId = bvEvent.target && bvEvent.target.id;
let modalId = bvEvent.target && bvEvent.target.id;
// sometimes the target isn't passed to the hidden event, fallback is the vueTarget
if (!modalId) {
modalId = bvEvent.vueTarget && bvEvent.vueTarget.id;
}
if (!modalId) return;
const modalStack = this.$store.state.modalStack;
Expand Down

0 comments on commit f8d8d4f

Please sign in to comment.