medium-zoom pagination issues

In my project I use medium-zoom with pagination. On first page it works well but on second, third, fourth… i have to click several times for close image…on second page…two times, on third 3 times…
it seems to be a problem with maybe any index number?

here is my code:

    <div v-if="loading" class="text-center">
          <i class="fas fa-spinner fa-pulse fa-5x"></i>
        <div v-else>
        <div class="m-3" v-for="(item, imageIndex) in pageOfItems" :key="">
            <div class="row mt-3">
              <div class="col-lg-9 my-auto" v-html="item.mytext">
              <div class="col-lg-3 my-auto text-center">
                <article class="container">
                <img class="img-thumbnail" :src= "'http://localhost:4000/api/galeria/' + item.galeriaId + '_f.jpg'">
          <hr class="hr1">
<div class="pb-0 pt-3 text-center">
  <jw-pagination :items="info" :pageSize="10" @changePage="onChangePage"></jw-pagination>

import mediumZoom from 'medium-zoom'
import axios from 'axios'
export default {
  data () {
    return {
      info: [],
      pageOfItems: [],
      loading: true
  mounted () {
      .then(response => ( =
      .finally(() => (this.loading = false))
  updated () {
    mediumZoom(('article img'), {
      background: 'transparent'
  methods: {
    onChangePage (pageOfItems) {
      // update page of items
      this.pageOfItems = pageOfItems

106 thoughts on “medium-zoom pagination issues”