From 300e4155ef49795309b8ef2049e55654dac2d651 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 27 May 2020 19:36:29 +0200 Subject: [PATCH] fix #3661 @1 --- js/libs/fluidbook/fluidbook.contentlock.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.contentlock.js b/js/libs/fluidbook/fluidbook.contentlock.js index 7b805442..29e35701 100644 --- a/js/libs/fluidbook/fluidbook.contentlock.js +++ b/js/libs/fluidbook/fluidbook.contentlock.js @@ -130,16 +130,20 @@ FluidbookContentLock.prototype = { unlockCurrentPage: function () { var $this = this; var change = false; + + var unlockEvenPages = !this.fluidbook.mobilefirst.enabled; + var currentPage = $this.fluidbook.currentPage; + $.each(this.locks, function (k, v) { if (v.unlocked === 1) { return; } - var currentPage = $this.fluidbook.currentPage; - if (currentPage % 2 === 1) { + + if (unlockEvenPages && currentPage % 2 === 1) { currentPage--; } - var lockPage = k; - if (lockPage % 2 === 1) { + var lockPage = parseInt(k); + if (unlockEvenPages && lockPage % 2 === 1) { lockPage--; } if (currentPage !== lockPage) { -- 2.39.5