Skip to content

Node.js based forum software built for the modern web

drag nav

Barış Soner Uşaklı7b5c4f343a10
diff --git a/public/src/modules/navigator.js b/public/src/modules/navigator.js
index c83a45ce3d..91c8ca1f8c 100644
--- a/public/src/modules/navigator.js
+++ b/public/src/modules/navigator.js
@@ -56,6 +56,17 @@ define('navigator', ['forum/pagination', 'components'], function (pagination, co
}
});
+ $('.pagination-block.visible-xs').on('touchmove', function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ var x = Math.min($(window).width(), Math.max(0, e.touches[0].clientX));
+ var percent = x / $(window).width();
+ index = Math.floor(count * percent);
+ navigator.updateTextAndProgressBar();
+ }).on('touchend', function () {
+ navigator.scrollToIndex(index - 1, true);
+ });
+
handleKeys();
navigator.setCount(count);