Question
Javascript: Turning off mobile gestures on specific page
I've added some of my own HTML elements to a course, this works fine when mobile gestures are off. But when they are on the elements cannot be clicked. I'm hoping to be able to turn this feature off for a specific slide if it's possible to get at that property.
This is the portion of CPM.js that is added when this feature is enabled, does anyone know how b.defaults.stop_browser_behavior can be changed by Javascript?
(function (i, m) {
var b = function (a, c) {
return new b.Instance(a, c || {});
};
b.defaults = {
stop_browser_behavior: {
userSelect: "none",
touchAction: "none",
touchCallout: "none",
contentZooming: "none",
userDrag: "none",
tapHighlightColor: "rgba(0,0,0,0)",
},
};
b.HAS_POINTEREVENTS =
i.navigator.pointerEnabled || i.navigator.msPointerEnabled;
b.HAS_TOUCHEVENTS = "ontouchstart" in i;
b.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android|silk/i;
b.NO_MOUSEEVENTS =
b.HAS_TOUCHEVENTS && i.navigator.userAgent.match(b.MOBILE_REGEX);
b.EVENT_TYPES = {};
b.DIRECTION_DOWN = "down";
b.DIRECTION_LEFT = "left";
b.DIRECTION_UP = "up";
b.DIRECTION_RIGHT = "right";
b.POINTER_MOUSE = "mouse";
b.POINTER_TOUCH = "touch";
b.POINTER_PEN = "pen";
b.EVENT_START = "start";
b.EVENT_MOVE = "move";
b.EVENT_END = "end";
b.DOCUMENT = i.document;
b.plugins = b.plugins || {};
b.gestures = b.gestures || {};
b.READY = !1;
b.utils = {
extend: function (a, b, d) {
for (var e in b) (a[e] !== m && d) || (a[e] = b[e]);
return a;
},
each: function (a, b, d) {
var e, f;
etc etc
},
};
"function" == typeof define && define.amd
? define(function () {
return b;
})
: "object" === typeof module && module.exports
? (module.exports = b)
: (i.Hammer = b);
})(window);
