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

Scrollspy not working on docs secondary nav when running locally #13659

Closed
ackernaut opened this issue May 22, 2014 · 16 comments
Closed

Scrollspy not working on docs secondary nav when running locally #13659

ackernaut opened this issue May 22, 2014 · 16 comments

Comments

@ackernaut
Copy link

Steps to reproduce this issue:

  1. Pull latest from master branch
  2. Run jekyll serve
  3. Go to http://localhost:9001/

As you scroll the sections the top list item will have the active class but the secondary list items are not targeted.

screen shot 2014-05-22 at 10 29 17 am

<li class="active">
  <a href="#dropdowns">Dropdowns</a>
  <ul class="nav">
    <li><a href="#dropdowns-example">Example</a></li>
    <li><a href="#dropdowns-alignment">Alignment options</a></li>
    <li><a href="#dropdowns-headers">Headers</a></li>
    <li><a href="#dropdowns-disabled">Disabled menu items</a></li>
  </ul>
</li>
@XhmikosR
Copy link
Member

Confirmed.

78cac11 seems to have caused it from #13541.

@XhmikosR
Copy link
Member

/CC @fat

@cvrebert cvrebert added js and removed docs labels May 22, 2014
@cvrebert cvrebert added this to the v3.2.0 milestone May 22, 2014
@cvrebert
Copy link
Collaborator

I guess Affix needs some more unit tests.

@XhmikosR
Copy link
Member

Yeah. I noticed it too yesterday, but I thought my local tree was messed up so I didn't dig into this more.

@XhmikosR
Copy link
Member

What's interesting is that I don't see the issue present in my xhmikosr-js-style branch from #13388.

@cvrebert
Copy link
Collaborator

Another reason to merge in the style improvements then! 😄

@XhmikosR
Copy link
Member

OK, I was tricked. Basically if you open http://127.0.0.1:9001/components/#x then everything is fine for x but not for the rest.

@XhmikosR
Copy link
Member

So it's not the above patch I mentioned that's causing the problem. I'll try to pinpoint the faulty commit.

@ackernaut
Copy link
Author

@XhmikosR Yeah, I see what you mean. The parent nav section will work if I load the page with a sub-nav item:

http://localhost:9001/components/#dropdowns-headers

@XhmikosR
Copy link
Member

Yeah and it makes things harder to pinpoint the cause :(

I have reverted all relevant changes after 3.1.1 and I still can't make it to work. The 3.1.1 tag works fine, so it must be something really weird...

@mdo
Copy link
Member

mdo commented May 23, 2014

The parent links get .active for me in Safari, but I don't see the subnav links getting the class. I checked the scrollspy plugin and nothing looks off there—not a lot of commits against that file.

@XhmikosR
Copy link
Member

OK, I have found the commit that caused it. It's 0f366e0 from #12337.

@fat
Copy link
Member

fat commented Jun 11, 2014

hm… im not seeing this problem in chrome…

@cvrebert
Copy link
Collaborator

I can't repro with 0f366e0 even.
@XhmikosR Can you try and repro this with the latest code?

@mdo
Copy link
Member

mdo commented Jun 11, 2014

Yeah, working for me now in latest master.

@mdo mdo closed this as completed Jun 11, 2014
@mdo mdo removed this from the v3.2.0 milestone Jun 11, 2014
@XhmikosR
Copy link
Member

Confirmed.

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

No branches or pull requests

5 participants