Fix #3894: Pjax call does not does not release scroll body scroll lock when default swipe is active

This commit is contained in:
buddh4 2020-03-05 18:09:25 +01:00
parent aeffdfcab6
commit 136e13ca59
2 changed files with 9 additions and 3 deletions

View File

@ -6,6 +6,7 @@ HumHub Change Log
- Fix #3887: CSS presentation issue for tables wider than the container and videos missing borders (areasas)
- Fix #3893: New user invite headline broken in German translation
- Enh: Updated translation files
- Fix #3894: Pjax call does not does not release scroll body scroll lock when default swipe is active
1.4.2 (Februrary 27, 2020)

View File

@ -4,6 +4,11 @@ humhub.module('ui.view', function (module, require, $) {
var title;
var state = {};
var prevSwipeDelay = false;
var prevSwipe = false;
var scrollTimeout;
var isSmall = function () {
return module.getWidth() <= 767;
};
@ -36,6 +41,9 @@ humhub.module('ui.view', function (module, require, $) {
module.initOnPjaxLoad = true;
var init = function (pjax) {
prevSwipeDelay = false;
prevSwipe = false;
$('body').removeClass('modal-open');
if(isSmall() && module.config.useDefaultSwipe) {
setTimeout(initMobileSidebar, 50);
@ -53,10 +61,7 @@ humhub.module('ui.view', function (module, require, $) {
};
var prevSwipeDelay = false;
var prevSwipe = false;
var scrollTimeout;
var preventSwipe = function(prev) {
prevSwipe = object.isDefined(prev) ? prev : true;