From 717b6470c76e6e44fb00f31cfddeaefe13444181 Mon Sep 17 00:00:00 2001 From: Etheryte Date: Mon, 23 Sep 2024 12:16:30 +0300 Subject: [PATCH 1/2] Fix sticky header scroll bug --- web/html/javascript/spacewalk-essentials.js | 5 +++-- web/spacewalk-web.changes.eth.multi-sst | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 web/spacewalk-web.changes.eth.multi-sst diff --git a/web/html/javascript/spacewalk-essentials.js b/web/html/javascript/spacewalk-essentials.js index 167e843d1773..2cc2f13fa0be 100644 --- a/web/html/javascript/spacewalk-essentials.js +++ b/web/html/javascript/spacewalk-essentials.js @@ -99,7 +99,8 @@ function sstScrollBehaviorSetup(sst) { // when the page scrolls down and the toolbar is going up and hidden, // the toolbar takes a fixed place right below the header bar function handleSst() { - var sst = jQuery('.spacewalk-section-toolbar'); + // Some pages may have multiple instances of this element + var sst = jQuery('.spacewalk-section-toolbar').first(); if (jQuery('.move-to-fixed-toolbar').length > 0) { // if there is no 'spacewalk-section-toolbar', then create it @@ -143,7 +144,7 @@ function handleSst() { } function sstStyle() { - var sst = jQuery('.spacewalk-section-toolbar'); + var sst = jQuery('.spacewalk-section-toolbar').first(); if (sst.hasClass('fixed')) { sst.css({ top: jQuery('header').outerHeight() - 1, diff --git a/web/spacewalk-web.changes.eth.multi-sst b/web/spacewalk-web.changes.eth.multi-sst new file mode 100644 index 000000000000..40b71eec6f8e --- /dev/null +++ b/web/spacewalk-web.changes.eth.multi-sst @@ -0,0 +1 @@ +- Fix sticky header scroll bug From 9868d55184bf0e9baae0a5d01a09d8eff656f9c3 Mon Sep 17 00:00:00 2001 From: Karl Tarvas Date: Mon, 23 Sep 2024 14:18:38 +0200 Subject: [PATCH 2/2] Update web/spacewalk-web.changes.eth.multi-sst Co-authored-by: Marina Latini --- web/spacewalk-web.changes.eth.multi-sst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/spacewalk-web.changes.eth.multi-sst b/web/spacewalk-web.changes.eth.multi-sst index 40b71eec6f8e..5dd22cb729e4 100644 --- a/web/spacewalk-web.changes.eth.multi-sst +++ b/web/spacewalk-web.changes.eth.multi-sst @@ -1 +1 @@ -- Fix sticky header scroll bug +- Fix sticky header infinite scroll