twbs / bootstrap-sass

Official Sass port of Bootstrap 2 and 3.
http://getbootstrap.com/css/#sass
MIT License
12.58k stars 3.53k forks source link

Navbar (fixed navbar) dropdown menu broken on 3.3.3, 3.3.2 #829

Closed FranzZemen closed 9 years ago

FranzZemen commented 9 years ago

Works on 3.3.1, not on 3.3.2 or 3.3.3.

Clicking on the drop down does nothing. Regular

  • menu items work.

  • cvrebert commented 9 years ago

    What OS and browser are you using?

    FranzZemen commented 9 years ago

    Chrome, Windows OSX centOS On Jan 23, 2015 10:31 AM, "Chris Rebert" notifications@github.com wrote:

    What OS and browser are you using?

    — Reply to this email directly or view it on GitHub https://github.com/twbs/bootstrap-sass/issues/829#issuecomment-71220375.

    FranzZemen commented 9 years ago

    In addition, here is the relevant markeup. The products menu doesn't expand under the said versions. All I change is the sassbootstrap version back to .1 and it works.

        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                    <nav class="navbar navbar-default navbar-fixed-top">
                        <div class="container">
                            <div class="navbar-header">
                                <button type="button" class="navbar-toggle

    collapsed" data-toggle="collapse" data-target="#nav1">

                                    <span class="sr-only">Toggle

    Navigation <img src="assets/images/PAVOCOM_LOGO.svg">

                        </div>
                    </nav>
                </div>
            </div>

    blah blah blah stuff goes here.

    On Sat, Jan 24, 2015 at 6:08 PM, Franz Zemen franzzemen@gmail.com wrote:

    Chrome, Windows OSX centOS On Jan 23, 2015 10:31 AM, "Chris Rebert" notifications@github.com wrote:

    What OS and browser are you using?

    — Reply to this email directly or view it on GitHub https://github.com/twbs/bootstrap-sass/issues/829#issuecomment-71220375 .

    cvrebert commented 9 years ago

    @FranzZemen Could you post an example that doesn't involve Angular?

    shawnacscott commented 9 years ago

    Here's a reproduction case: https://gist.github.com/shawnacscott/e4b5054cf61589b14cc7

    I'm having this issue as well, though with a Rails installation. Reverting to 3.3.1 fixes the problem for me.

    OS X 10.10.1 Firefox Developer Edition 37.0a2 (2015-02-03)

    cvrebert commented 9 years ago

    @shawnacscott Please confirm that you're using Autoprefixer.

    shawnacscott commented 9 years ago

    @cvrebert I have gem 'autoprefixer-rails', '>= 5.0' in my Gemfile, and Gemfile.lock shows:

    autoprefixer-rails (5.1.1)
          execjs
          json

    and

    bootstrap-sass (3.3.3)
          autoprefixer-rails (>= 5.0.0.1)
          sass (>= 3.2.19)

    Here's a gist of my full Gemfile: https://gist.github.com/shawnacscott/08c89617d339da88ca02

    glebm commented 9 years ago

    How are you including the JavaScript? It would be very easy for us to reproduce if you publish a minimal rails app with this issue.

    FranzZemen commented 9 years ago

    In my case I'm using angular-fullstack, so its via bower components and then concatenated, minified etc. However, I have a dev build that doesn't concatenate or minify, just includes the bower files via script tag, same result.

    On Thu, Feb 12, 2015 at 4:55 PM, Gleb Mazovetskiy notifications@github.com wrote:

    How are you including the JavaScript?

    — Reply to this email directly or view it on GitHub https://github.com/twbs/bootstrap-sass/issues/829#issuecomment-74171595.

    shawnacscott commented 9 years ago

    Your wish is my command, @glebm :)

    glebm commented 9 years ago

    @shawnacscott In your example Bootstrap javascript is included twice: bootstrap-sprockets provides individual bootstrap JS files (alert.js, dropdown.js), while bootstrap provides a concatenated file with all of the bootstrap JS in it. Only one of these should be required, not both. I realize how confusing this must be given that for Sass, both bootstrap-sprockets, which provides Sprockets asset path support, and bootstrap must be imported.

    The dropdown menu works after removing one of the //= requires.

    shawnacscott commented 9 years ago

    Thanks, that was it. I'll send a PR adding a caveat in the README.