v-disable-swipe-back

This vue 3 directive for ionic framework, disables switching the previous route if the user makes a swipe on device iOS

Usage no npm install needed!

<script type="module">
  import vDisableSwipeBack from 'https://cdn.skypack.dev/v-disable-swipe-back';
</script>

README

v-disable-swipe-back

Getting Started

You can install v-disable-swipe-back using npm.

npm install v-disable-swipe-back

Then in main.ts of your ionic vue project

import App from './App.vue';

import {DisableSwipeBackDirective} from 'v-disable-swipe-back';

const app = createApp(App)
  .directive('disable-swipe-back', DisableSwipeBackDirective);

In vue template include directive in ion-page

<ion-page v-disable-swipe-back>
 ...
</ion-page>