Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter joehealy

    (@joehealy)

    I fixed it with the following patch:

    diff navigation.js_orig navigation.js
    2a3
    >
    11,13c12,13
    < var JALBEE_SITENAV = document.querySelector(‘.main-navigation’),
    < JALBEE_KEYMAP = {
    < TAB: 9

    > var JALBEE_KEYMAP = {
    > TAB: 9
    16,20c16,22
    < // Initiate the menus when the DOM loads.
    < // document.addEventListener(‘DOMContentLoaded’, function () {
    < // jalbeeInitMainNavigation();
    < // jalbeeInitMenuToggle();
    < // });

    > if ( ‘loading’ === document.readyState ) {
    > // The DOM has not yet been loaded.
    > document.addEventListener( ‘DOMContentLoaded’, initNavigation );
    > } else {
    > // The DOM has already been loaded.
    > initNavigation();
    > }
    21a24,25
    > // Initiate the menus when the DOM loads.
    > function initNavigation() {
    24c28,31
    < /**

    > doSomethingElse();
    > };
    >
    > /**
    28a36,37
    > const JALBEE_SITENAV = document.querySelector(‘.main-navigation’);
    >
    120a130,136
    > const JALBEE_SITENAV = document.querySelector(‘.main-navigation’);
    >
    > // No point if no site nav.
    > if (!JALBEE_SITENAV) {
    > return;
    > }
    >
    235a252,259
    > function doSomethingElse() {
    > const JALBEE_SITENAV = document.querySelector(‘.main-navigation’);
    >
    > // No point if no site nav.
    > if (!JALBEE_SITENAV) {
    > return;
    > }
    >
    262c286,288
    < })();
    \ No newline at end of file

    > }
    >
    > })();

    Thread Starter joehealy

    (@joehealy)

    This issue in wprig is relevant:

    https://github.com/wprig/wprig/issues/136

Viewing 2 replies - 1 through 2 (of 2 total)