Commit 626ab93b authored by gijs's avatar gijs

Fix panel behaviour on mobile?

parent 49960b96
......@@ -293,7 +293,7 @@
panel = findPanel(toggle);
toggle.addEventListener('mousedown', startMove);
toggle.addEventListener('touchstart', startMove);
if (!document.ontouchstart) {
if (!window.ontouchstart && !window.DocumentTouch && !window.TouchEvent) {
toggle.addEventListener('mouseenter', function () {
if (panel.dataset.active !== 'true') {
shiftContainer(container, (panel.dataset.panelPosition === 'left') ? 30 : -30);
......@@ -345,7 +345,7 @@
if (togglePrevious) {
if (previous) {
if (!document.ontouchstart) {
if (!window.ontouchstart && !window.DocumentTouch && !window.TouchEvent) {
togglePrevious.onmouseenter = function () { shiftContainer(container, 30); };
togglePrevious.onmouseleave = function () { shiftContainer(container, 0); };
}
......@@ -361,7 +361,7 @@
if (toggleNext) {
if (next) {
if (!document.ontouchstart) {
if (!window.ontouchstart && !window.DocumentTouch && !window.TouchEvent) {
toggleNext.onmouseenter = function () { shiftContainer(container, -30); };
toggleNext.onmouseleave = function () { shiftContainer(container, 0); };
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment