From 55b325cda82602c73de90e8723f5d831a00414c8 Mon Sep 17 00:00:00 2001 From: SteveSamJacob19 Date: Fri, 17 Nov 2023 13:27:23 +0530 Subject: [PATCH 1/2] Fixed overflow of toc --- src/main/content/_assets/js/openliberty.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/content/_assets/js/openliberty.js b/src/main/content/_assets/js/openliberty.js index 18457c4ccf..66f30cce02 100644 --- a/src/main/content/_assets/js/openliberty.js +++ b/src/main/content/_assets/js/openliberty.js @@ -45,9 +45,9 @@ var openliberty = (function() { // make toc scroll off of screen at Nice Work section in guides if (typeof isBackgroundBottomVisible === "function") { - if(isBackgroundBottomVisible()) { + setTimeout( () => { if(isBackgroundBottomVisible()) { handleTOCScrolling(); - } + } }, 2000); } prevScrollTop = currScrollTop; From 190c011bc6fe74a69f126009b78ce695e1791951 Mon Sep 17 00:00:00 2001 From: SteveSamJacob19 Date: Mon, 20 Nov 2023 12:14:12 +0530 Subject: [PATCH 2/2] Fixed overflow of toc --- src/main/content/_assets/js/openliberty.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/content/_assets/js/openliberty.js b/src/main/content/_assets/js/openliberty.js index 66f30cce02..ec4b6ac6ea 100644 --- a/src/main/content/_assets/js/openliberty.js +++ b/src/main/content/_assets/js/openliberty.js @@ -8,7 +8,8 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -var openliberty = (function() { +setTimeout(() => { + var openliberty = (function() { $(document).ready(function() { var scrollAllowed = true; var prevScrollTop = 0; @@ -45,9 +46,9 @@ var openliberty = (function() { // make toc scroll off of screen at Nice Work section in guides if (typeof isBackgroundBottomVisible === "function") { - setTimeout( () => { if(isBackgroundBottomVisible()) { + if(isBackgroundBottomVisible()) { handleTOCScrolling(); - } }, 2000); + } } prevScrollTop = currScrollTop; @@ -179,4 +180,4 @@ var openliberty = (function() { allowScrolling: allowScrolling, copy_element_to_clipboard: copy_element_to_clipboard }; -})(); +})() },1000);