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

[nav] regression in #navbarCollapse #677

Closed
Marzal opened this issue Jan 3, 2020 · 1 comment
Closed

[nav] regression in #navbarCollapse #677

Marzal opened this issue Jan 3, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@Marzal
Copy link
Contributor

Marzal commented Jan 3, 2020

Is this a BUG REPORT or FEATURE REQUEST?:
bug

What happened:
Regression in nav

What you expected to happen:
When you click on the nav hamburger it should show the list

How to reproduce it (as minimally and precisely as possible):
Just click on the demo site with a small windows size

Anything else we need to know?:
This is all I could find

0.15

HTML:
<div class="navbar-collapse justify-content-between collapse show in" id="navbarCollapse">

Function:
assets/js/helpers/bootstrap-helper.js

function toggleMenu(node) {
  const menu = document.querySelector(node.dataset.target);
  menu.classList.toggle('in');
}

0.16

HTML:
<div class="navbar-collapse justify-content-between collapse show" id="navbarCollapse">

Function:
assets/js/collapse.js

const showCollapse = function (el, target) {
  $(el).attr('aria-expanded', 'true');
  $(el).removeClass('collapsed');
  $(target).addClass('show');
};

So the problem seems to be that in 0.16 the new functions don't add the in class

Environment:

  • Syna Theme version: 0.16
  • Hugo version: 0.60
@Marzal Marzal changed the title Nav regression in #navbarCollapse [nav] regression in #navbarCollapse Jan 3, 2020
@stp-ip stp-ip added the bug label Jan 4, 2020
@stp-ip stp-ip added this to the v0.16.1 milestone Jan 4, 2020
@stp-ip
Copy link
Member

stp-ip commented Jan 11, 2020

There seems to have been a bigger underlying issue with a code change leading to a full DOM reset resulting in lost event listeners. This should be fixed in #681.

If this is still an issue in master let us know and reopen :)

@stp-ip stp-ip closed this as completed Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants