Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sticky header scroll bug #9286

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions web/html/javascript/spacewalk-essentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions web/spacewalk-web.changes.eth.multi-sst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix sticky header scroll bug
Etheryte marked this conversation as resolved.
Show resolved Hide resolved
Loading