ianmartorell / meteor-accounts-ui-bootstrap-3

accounts-ui package with Bootstrap 3 and localization support
150 stars 109 forks source link

Drop down menu on sign in #198

Open MaratAkhmatnurov opened 8 years ago

MaratAkhmatnurov commented 8 years ago

When I'm clicking to "sign in/Join", nothing's going on. Drop down menu doesn't shown

advikguha commented 8 years ago

I'm having the same problem. Did you find a fix?

pechitook commented 8 years ago

Same here. I'm using the bootstrap-sass package

pechitook commented 8 years ago

So I found a solution. Turns out that somehow bootstrap is not initializing the dropdown. If I manually run $('.dropdown-toggle').dropdown() after the page loads, it works.

The following patch makes it work again, but @ianmartorell you should check this out when you have some time to see if you can replicate the error.

Template._loginButtonsLoggedOutDropdown.rendered = function() {
    $('.dropdown-toggle').dropdown()
}

Template._loginButtonsLoggedInDropdown.rendered = function() {
    $('.dropdown-toggle').dropdown()
}
mgebundy commented 8 years ago

Thanks @p4bloch

Easy fix, but regressions make me a sad panda.

pechitook commented 8 years ago

Glad it worked for you too @mgebundy!

mherb63 commented 8 years ago

I have the same issue. Is there a way to fix this in css?

@p4bloch where did you put your Template code? I have my nav template in nav.html and tried your solution in nav.js but it didn't make a difference.

image

pechitook commented 8 years ago

@mherb63 I placed it in my JS file as well, not sure why it's not working for you. Are you on latest version? I believe the .rendered API had some changes over time. You can try this syntax

Template.MyTemplate.onRendered(function () {
 // code
});
mherb63 commented 8 years ago

@p4bloch yes, I used onRendered. This problem only happens for me when the page size is that of an IPhone 6. The issue appears when running on an XCode simulator.

ShakataGaNai commented 8 years ago

Just chiming in on this to note that I've also run into this error. My project was idle for a while so I just upgraded all the packages and to meteor 1.4.0.1. The package versions I have:

twbs:bootstrap 3.3.6 ian:accounts-ui-bootstrap-3 1.2.89

(Note, I used @p4bloch fix and I'm good for now.)

joaoeffting commented 7 years ago

Same problem here :/