Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2059
  • Last Modified:

Bootstrap Dropdown Menu in Safari

I'm working on a project using bootstrap.  I have a dropdown menu that renders fine in ie9, firefox and chrome.

You can view the page here: http://www.sdwebstudio.com/bootstrap/index5.html

On the dropdown I have a spot to enter in your email address.  It's a simple text field.

In safari this text field creates a problem.  If you rollover "Support" and try to click on the text box, the menu diappears.  As soon as the mouse enters the text field, the menu disappears regardless if you click it or not.

Again, this all functions as it is supposed to in Fire Fox, Chrome and IE.

Any ideas?
0
slightlyoff
Asked:
slightlyoff
  • 3
  • 2
1 Solution
 
Kyle HamiltonData ScientistCommented:
It doesn't do that in my Safari on Mac. I haven't tried it in Safari on PC - I'm not sure too many people use Safari on PC... Anyway, it probably has to do with the fact that, essentially, you have "moused out" of the dropdown once you enter into the text field area. It has to do with event bubbling. You could try adding the following to your script:

$(".nav li.top-nav").mouseover(function(e) {
                  e.stopPropagation();
            .....

You should also use mouseenter, and mouseleave instead of mouseover and mouseout. That in itself may stop the undesired behavior in Safari.

But I'm wondering why you're using javascript for this. This can be easily done with just CSS.
0
 
slightlyoffAuthor Commented:
On your mac you can click on the text box and type stuff in?

Thanks for your response, btw.  ;)

I am coding using bootstrap because the original developer used bootstrap and all I was supposed to do was clean it up and add the forms.

I was able to use e.stopPropagation earlier to make the form work on the other browsers, but I haven't been successful with Safari.  I'll give you suggestion a try.

Thank you!
0
 
Kyle HamiltonData ScientistCommented:
yes. I was able to type into the field on my Mac Safari(V6)

Best cleanup would be to get rid of the javascript and do it in plain CSS, they're just hovers :)

Cheers.
0
 
slightlyoffAuthor Commented:
Sorry, I forgot to mark this as solved.  Thank you for your help!
0
 
Kyle HamiltonData ScientistCommented:
No problem. Thanks. :)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now