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

Must click primary nav item twice to see secondary menu #2

Open
gltarsa opened this issue Jul 18, 2017 · 3 comments
Open

Must click primary nav item twice to see secondary menu #2

gltarsa opened this issue Jul 18, 2017 · 3 comments
Labels

Comments

@gltarsa
Copy link
Contributor

gltarsa commented Jul 18, 2017

I am trying to move our app away from the simple-navigation-bootstrap gem to this one and have managed to get everything working, but I have one problem: when I click on a primary item in the nav bar, I need to click it a second time to see the menu.

Is this expected behavior? Is there a way to configure it to display the menu on the first click?

@n-rodriguez
Copy link
Member

Is this expected behavior? Is there a way to configure it to display the menu on the first click?

Did you try https://github.com/jbox-web/simple_navigation_bootstrap#notes ?
It seems to be a Bootstrap / JS / CSS thing. Be sure to set the proper CSS classes on nav menus and items and to not have duplicated html ids on the page.

@n-rodriguez n-rodriguez self-assigned this Jul 18, 2017
@gltarsa
Copy link
Contributor Author

gltarsa commented Jul 18, 2017

Thanks for the quick reply. None of the @includes in the notes have any effect.

It appears that the presence of data-toggle="dropdown" is triggering the problem. If I remove it, the navbar works as expected.

I did not think to mention it in my original report, but we use AngularJS for our front-end. That may be contributing to the problem.

@gltarsa
Copy link
Contributor Author

gltarsa commented Jul 19, 2017

The problem may be in my code, my workaround was to override dropdown_part in lib.simple_navigation_bootstrap/rendered_item.rb in an appconfig/initializers file and copy all but the line that adds the offending attribute.

I am pretty sure that this is not the right solution for the gem, but it got me out of my bind.

@n-rodriguez n-rodriguez removed their assignment Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants