Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • Merge requests
  • !13392

Fix incorrect offset from top when affixed element is affix-bottom.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/charlesbjohnson/affix-bottom-use-bottom-offset into master 11 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 3

Created by: charlesbjohnson

Please see #13405

Hi!

This fixes an issue caused by #12862.

Gif of the issue: before

Gif with my change: after

Demo of twbs/bootstrap @ master: http://embed.plnkr.co/lr1b2JjTtZYwpSFqJ7GL/preview

Demo of charlesbjohnson/bootstrap @ affix-bottom-use-bottom-offset: http://embed.plnkr.co/FEePQwXnwMUCGm4suKOB/preview

Thanks!

Compare
  • master (base)

and
  • latest version
    d7d8bab0
    1 commit, 2 years ago

3 files
+ 3
- 3

    Preferences

    File browser
    Compare changes
dis‎t/js‎
bootst‎rap.js‎ +1 -1
bootstra‎p.min.js‎ +1 -1
j‎s‎
affi‎x.js‎ +1 -1
dist/js/bootstrap.js
+ 1
- 1
  • View file @ d7d8bab0


@@ -1958,7 +1958,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
.trigger($.Event(affixType.replace('affix', 'affixed')))
if (affix == 'bottom') {
this.$element.offset({ top: position.top })
this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
}
}
dist/js/bootstrap.min.js
+ 1
- 1
  • View file @ d7d8bab0

Files with large changes are collapsed by default.

js/affix.js
+ 1
- 1
  • View file @ d7d8bab0


@@ -82,7 +82,7 @@
.trigger($.Event(affixType.replace('affix', 'affixed')))
if (affix == 'bottom') {
this.$element.offset({ top: position.top })
this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
}
}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference: kahun/awesome-sysadmin!35
Source branch: github/fork/charlesbjohnson/affix-bottom-use-bottom-offset

Menu

Explore Projects Groups Snippets