Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #12815
Closed
Open
Issue created Feb 22, 2014 by Administrator@rootContributor

offset-top=0 and offset-bottom=0 don't work on affix plugin via data attributes

Created by: tarot

Via JavaScript, affix plugin can accept {offset:{top:0, bottom:0}} options.

But via data attributes,

<nav data-spy="affix" data-offset-top="0" data-offset-bottom="0">...</nav>

means

<nav data-spy="affix">...</nav>

Probrem in: https://github.com/twbs/bootstrap/blob/master/js/affix.js#L130-L131

Expected:

      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
      if (data.offsetTop != null)    data.offset.top    = data.offsetTop
Assignee
Assign to
Time tracking