From d702cbf548de876740d13ddadfb63227209701a0 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 5 Oct 2020 17:48:20 +0200 Subject: [PATCH] Disable button instead of hiding them in OO history --- www/common/onlyoffice/history.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/www/common/onlyoffice/history.js b/www/common/onlyoffice/history.js index 4ef9d8470..2f2e6ee8d 100644 --- a/www/common/onlyoffice/history.js +++ b/www/common/onlyoffice/history.js @@ -156,16 +156,18 @@ define([ $fastPrev.show(); $next.show(); $fastNext.show(); + $hist.find('.cp-toolbar-history-next, .cp-toolbar-history-previous') + .prop('disabled', ''); if (cpIndex >= cps && msgIndex === 0) { - $fastPrev.hide(); + $fastPrev.prop('disabled', 'disabled'); } if (cpIndex === 0) { - $fastNext.hide(); + $fastNext.prop('disabled', 'disabled'); } var id = getId(); var msgs = (ooMessages[id] || []).length; if (msgIndex >= (msgs-1)) { - $next.hide(); + $next.prop('disabled', 'disabled'); } }; @@ -199,8 +201,8 @@ define([ h('i.fa.fa-step-forward') ]); $fastPrev = $(fastPrev); - $fastNext = $(fastNext).hide(); - $next = $(_next).hide(); + $fastNext = $(fastNext).prop('disabled', 'disabled'); + $next = $(_next).prop('disabled', 'disabled'); var pos = h('span.cp-history-timeline-pos.fa.fa-caret-down'); var time = h('div.cp-history-timeline-time');