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
  • Merge requests
  • !2981

Fixed collapse's first show issue

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/tagliala/collapse-fix into navbar_collapse_fix Apr 07, 2012
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: tagliala

Dear all,

I see you are working on the collapse navbar that seems to have issues.

Anyway, also in this branch there is a strange behaviour that happens only the first time you click on the collapse button.

It can be replicated this way (on almost all websites using responsive layout and bootstrap):

  1. Go at http://twitter.github.com/bootstrap/index.html
  2. Reduce the page until the collapse button appears
  3. Click on the collapse button
  4. Enlarge the page until the collapse button disappears

The collapsed navbar will not disappear, it will stay empty.

Now, if you reduce the page one more time, click two times on the collapse menu (hide navbar / show navbar) and then enlarge the page again, the behaviour will be as expected.

Why?

It seems to be a problem in the show() method of bootstrap-collapse.js. At the first run, show() sets height as the actual pixel height of the collapsed menu. After it sets height to auto.

This pull request deals with height attribute, setting it always to auto. Test passes. I don't know if this has effects on older browsers: the latest versions of Opera, Safari, IE, Firefox, Chrome and Opera Mobile works fine.

Thanks for your work and hope it helps

Best Regards

GT

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/tagliala/collapse-fix