Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
Bootstrap Vue modal causing page jump on close / safari issue

When I close my bootstrap vue modal it causes a page jump to the section that has the open modal triggers which is fine. In Safari it is jumping well above the section where the triggers are. Is there a way to add a prevent default or similiar that will stop the page jumping when the modal is closed?

<template>
  <b-modal
    :visible="visible"
    size="lg"
    centered
    @hidden="closeModal"
    hide-footer
  >
    <p>
    modal body
    </p>
    <template>
      <div class="w-100">
        <b-button
          class="btn btn-icon"
          @click.prevent="closeModal"
        >
          <span class="l-btn float-left">
            <span class="btn-text">Cancel</span>
            <i class="btn-icon-symbol"></i>
          </span>
        </b-button>
        <a
          :href="$store.state.modals.interstitial.href"
          target="_blank"
          class="btn btn-icon btn-icon-arrow"
        >
          <span class="l-btn float-left">
            <span class="btn-text text-white">OK</span>
            <i class="btn-icon-symbol text-white"></i>
          </span>
        </a>
      </div>
    </template>
  </b-modal>
</template>

<script>
import { BButton } from 'bootstrap-vue';
export default {
  name: 'Modal',
  components: {
    'b-button': BButton,
  },
  computed: {
    visible() {
      return this.$store.state.modals.interstitial.show;
    },
  },
  methods: {
    closeModal() {
      this.$store.commit('modals/setShowModal', false);
      this.$store.commit('modals/setModalHref', '');
    },
  },
};
</script>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!