kalamuna / kstat-kss-builder

Twig KSS Template
MIT License
0 stars 2 forks source link

Style Guide Overview Page Links are Broken #34

Open doostinharrell opened 6 years ago

doostinharrell commented 6 years ago

If you try go navigate to pages linked on the overview page they don't work as expected.

Looks like the culprit is the e.preventDefault(); line in the file below. We should re-work js accordingly. https://github.com/kalamuna/kstat-kss-builder/blob/master/kss-assets/kstat-kss.js#L38

doostinharrell commented 6 years ago

@RobLoach I can't assign this one over to ya for some reason.

mikemccaffrey commented 6 years ago

This chunk of code in kstat-kss.js binds an event handler to the document and prevents the default click if it is outside of the sidebar, even if the sidebar is closed:

    // When you click outside the sidebar, the sidebar should close.
    $(document.body).on("click", function(e) {
      if ( $(e.target).closest('.kss-sidebar').length < 1 && $(e.target).closest('.sidebar-toggle').length < 1) {
        e.preventDefault();
        kstatKSS.closeSidebar();
      }
    });

We should change this to check that the sidebar is open before intercepting the click.