-
Notifications
You must be signed in to change notification settings - Fork 858
issue with css menu on mobile #282
Comments
You can use a callback after SmoothScroll runs to close the menu. smoothScroll.callback(function () {
// Some JS to close the menu
}) |
Thanks, any idea what this could be. I'm not fit enough for coming up with something useful. |
@thob I actually think I figured out what this is! If any of this doesn't make sense, please ask me to clarify... When Smooth Scroll animates a link, it uses Once that's done, it uses the The problem with this last part (the As a result---this is the unfortunate part---there's no way to fix it as the code is written today. I thought you were using a JS approach to expand and collapse the menu. Your CSS approach is awesome, but fails with the way Smooth Scroll is currently written. The good news: I plan on refactoring Smooth Scroll with a different approach. When you click a link:
This approach has fewer CSS quirks or browser compatibility issues associated with it because it's letting the browser do more of the heavy lifting (versus trying to recreate URL history in JavaScript). I'm hoping to get this done this week, but I can't commit to a hard launch date. But that's why this isn't working currently. Sorry about that! |
Also, reopening this and marking it as a bug. |
FYI: if using the CSS menu with a jquery based smooth scroll it works |
Fixed with v10.0.0 #283 Will be merging as soon as the build tests pass |
thanks for this super fast reaction! |
My pleasure! And thanks for letting me know about a weird edge-case bug I probably wouldn't have caught otherwise. This is one of my favorite things about open source projects! |
my problem is that the menu should close after clicking an anchor link in the mobile menu. It works without smooth-scroll (see here). When smooth-scroll is running however I have to close the menu manually. See it here
Any idea how to get back the desired behavior (automatic close of the mobile menu after click/tap)?
The text was updated successfully, but these errors were encountered: