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 links toggle format with each click #1044

Closed
pamolloy opened this issue Feb 3, 2021 · 3 comments · Fixed by #1049
Closed

Nav links toggle format with each click #1044

pamolloy opened this issue Feb 3, 2021 · 3 comments · Fixed by #1049
Labels
Bug A bug

Comments

@pamolloy
Copy link

pamolloy commented Feb 3, 2021

Problem

Navigation links toggle format with every click.

Reproducible Project

Navigate to any instance and click on any link in wy-nav-side. It will move to the corresponding header, make the link bold and the background darker. Then click on the link again and it will remove the bold and background formatting. It toggles with every click.

Expected Results

The format doesn't toggle with each click.

@pamolloy pamolloy changed the title Nav links toggle bold with each click Nav links toggle format with each click Feb 3, 2021
@pamolloy
Copy link
Author

pamolloy commented Feb 3, 2021

I noticed this when trying to extend this theme within our project without forking the theme. For some reason when I modified wy-nav-side to float it broke the Javascript attached to the links. The first time I click on a link generated from our project it moves the page to the link. Only on the second and each following click does it move the page to the corresponding header.

It seems to be related to the following line:

$("[data-toggle='wy-nav-shift']").removeClass("shift");

Using the breakpoint functionality in Firefox's Developer Tools shows that in this case the page moves to the corresponding header, but then back up to the link.

I'm certainly not a web programmer, but it seems like this should be a lot simpler.

@stsewd
Copy link
Member

stsewd commented Feb 3, 2021

Attaching a screenshot about the problem. Clicking on "LIBCLOUD_PROVIDERS" will toggle between bold and no-bold https://django-storages.readthedocs.io/en/latest/backends/apache_libcloud.html#libcloud-providers

Screenshot_2021-02-03 Apache Libcloud — django-storages 1 11 1 documentation
Screenshot_2021-02-03 Apache Libcloud — django-storages 1 11 1 documentation(1)

@stsewd stsewd added the Bug A bug label Feb 3, 2021
stsewd added a commit that referenced this issue Feb 9, 2021
Terminal nodes that are already selected shouldn't be toggled.

Fix #1044
@stsewd
Copy link
Member

stsewd commented Feb 9, 2021

Looks like we already have this reported at #306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants