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 clears active nav-item on Safari when rubber-band scrolling past the top of page #21055

Closed
RobRuana opened this issue Oct 31, 2016 · 1 comment

Comments

@RobRuana
Copy link
Contributor

ScrollSpy clears active nav-item on Safari when rubber-band scrolling past the top of page. If the first ScrollSpy target is at the very top of the page, the active nav-item that links to it will be cleared when the rubber-band effect pulls the page past the top.

scrollspysafaribug

JS Bin test case

Issue is a regression introduced by: e8af21c

Issue has been reproduced on:

  • macOS Sierra 10.12.1, Safari 10.0.1
  • iOS 10.1, Mobile Safari
RobRuana added a commit to RobRuana/bootstrap that referenced this issue Nov 1, 2016
…Safari rubberbands

When the rubberband effect causes Safari to scroll past the top of the
page, the value of scrollTop becomes negative. If the offset of the first
ScrollSpy target is 0 - essentially if the target is at the top of the
page - then ScrollSpy should not clear the active item. Conceptually, the
first item should remain active when rubberbanding past the top of the
page.

This commit fixes issue twbs#21055 by verifying the first scrollspy target is
not at the top of the page before clearing the active nav-item.
@malikfaizanhaider
Copy link

Same here !

On Nov 1, 2016 12:56 AM, "Rob Ruana" notifications@github.com wrote:

ScrollSpy clears active nav-item on Safari when rubber-band scrolling past
the top of page. If the first ScrollSpy target is at the very top of the
page, the active nav-item that links to it will be cleared when the
rubber-band effect pulls the page past the top.

[image: scrollspysafaribug]
https://cloud.githubusercontent.com/assets/2592431/19869168/6c6df8ce-9f68-11e6-969b-d7a19acc81e2.gif

JS Bin test case http://jsbin.com/jukihe/edit?html,output

Issue is a regression introduced by: e8af21c
e8af21c

Issue has been reproduced on:

  • macOS Sierra 10.12.1, Safari 10.0.1
  • iOS 10.1, Mobile Safari


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#21055, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEeuOsARX9bTH60oOkwN1jAnJiolwKMOks5q5kffgaJpZM4Klbxk
.

@mdo mdo mentioned this issue Nov 28, 2016
7 tasks
@mdo mdo closed this as completed in 5eddb0b Nov 28, 2016
@mdo mdo added this to the v4.0.0-alpha.6 milestone Nov 28, 2016
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

3 participants