Make WordPress Core

Opened 7 years ago

Closed 3 years ago

#42276 closed defect (bug) (invalid)

Twenty Seventeen: Bug with global.js (links not working)

Reported by: celinegrosjean's profile celinegrosjean Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9
Component: Bundled Theme Keywords:
Focuses: javascript Cc:


Good morning,

I'm using twentyseventeen theme with a child theme.
I'm contacting you to give you a bug with global.js

All the links are not working the first time (on my homepage)

line 29 to 45

my website :

But I'll use a js code to manage the problem


Attachments (1)

global.js (7.5 KB) - added by celinegrosjean 7 years ago.

Download all attachments as: .zip

Change History (4)

7 years ago


#1 @SergeyBiryukov
7 years ago

  • Component changed from General to Bundled Theme

#2 @SergeyBiryukov
6 years ago

  • Summary changed from twentyseventeen theme with bug global.js to Twenty Seventeen: Bug with global.js (links not working)

#3 @sabernhardt
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks for the report!

I see that you removed the scrolling function after discovering it did not work properly with your site. The function was added in ticket:38476, to prevent the fixed top menu from hiding focused controls. Of course, you did not want the navigation fixed at the top.

This seems related to .navigation-top {height: 100%;} in your child theme stylesheet. With that, the fixedNavHeight value is greater than the offset, so the script would run the scrollTo function when clicking on a link.

Adding height:0; to .site-navigation-fixed {display: none;} could have worked. Or else you could have disabled the site-navigation-fixed class entirely in the JS file (removing three calls to adjustScrollClass(): lines 184, 225 and 232).

Note: See TracTickets for help on using tickets.