Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

Disable for desktop (without VueJs warning about unknown element) #97

@MikaelEdebro

Description

@MikaelEdebro

I'm using vue-touch@next to wrap my entire app, in order to be able to swipe left/right to navigate between different steps/routes in my app (sort of what you normally do in a mobile app).
However, when vue-touch is enabled, I can't highlight/copy text on the page.

My App.js:

<template>
    <div id="app" :style="styles">
        <v-touch @swipeleft="swipeLeft" @swiperight="swipeRight">
            <transition name="fade" mode="out-in">
                <router-view class="view"></router-view>
            </transition>
        </v-touch>
    </div>
</template>

I have disabled the initialization of the plugin with:

if (isMobile) {
    VueTouch.config.swipe = {
        direction: 'horizontal'
    }
    Vue.use(VueTouch)
}

However, then I get VueJs warning that v-touch is not a known element.
Is there any good way to disable swipe gestures for desktop?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions