Foundation sticky nav jumps when scrolling fast in Safari

Viewed 291

I noticed that when I scroll upwards fast in Safari, the sticky nav jumps around, then I have to scroll slowly again to get it to click back into it's proper place. I'm using Foundation 6. Also, this is a new issue, as everything used to work just fine in Safari, but something must have changed in the past 4 months or so. See below for an example of the issue.

Example

Here's the HTML for the nav bar. I haven't done anything special with the CSS.

<nav class="top-bar-container hide-for-small-only" data-sticky-container>
  <div class="sticky sticky-topbar" data-sticky data-options="anchor: page; marginTop: 0; stickyOn: small;">
    <div class="top-bar">
      <div class="wrap">
        <div class="top-bar-left">
          <ul class="menu menu-hover-lines" data-magellan>
            <li><a class="menu-options" href="home">Home</a></li>
            <li><a class="menu-options" href="projects">Projects</a></li>
            <li><a class="menu-options" href="articles">Articles</a></li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</nav>

The issue only arises in Safari. Chrome, etc. everything works fine. Has anyone else had this problem? Any help is appreciated.

1 Answers

Had the same problem. I added an id to the body tag and then anchored the top container to it.

<body id="the-body">

<div data-sticky-container>
  <div data-sticky data-margin-top="0" data-top-anchor="the-body:top" data-stick-on="small">
  <div class="top-bar topbar-sticky-shrink" id="top-menu">
    <div class="top-bar-title">
      NAME
    </div>
    <div class="top-bar-right">
      <ul class="menu" data-magellan>
        <li><a href="#first">FIRST</a></li>
        <li><a href="#second">SECOND</a></li>
        <li><a href="#third">THIRD</a></li>
      </ul>
    </div>
  </div>
</div>
</div>

Related