fix(editor): Fix bug with touchscreens (#3206)

This commit is contained in:
Mutasem Aldmour 2022-04-28 17:36:41 +02:00 committed by GitHub
parent 8f46fd48d2
commit 8d9e05e3c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,8 @@ import Vue from 'vue';
export const deviceSupportHelpers = Vue.extend({ export const deviceSupportHelpers = Vue.extend({
data() { data() {
return { return {
isTouchDevice: 'ontouchstart' in window || navigator.maxTouchPoints, // @ts-ignore msMaxTouchPoints is deprecated but must fix tablet bugs before fixing this.. otherwise breaks touchscreen computers
isTouchDevice: 'ontouchstart' in window || navigator.msMaxTouchPoints,
isMacOs: /(ipad|iphone|ipod|mac)/i.test(navigator.platform), // TODO: `platform` deprecated isMacOs: /(ipad|iphone|ipod|mac)/i.test(navigator.platform), // TODO: `platform` deprecated
}; };
}, },