issues/45 : Check if an input field has focus on the mini login form, if no we hide the form

This commit is contained in:
touffies
2013-10-22 22:44:35 +02:00
parent ac70075a38
commit c48c7b5486

View File

@@ -29,7 +29,11 @@
.on('mouseleave.subnav', '.dropdown', function(){
if(!$(this).hasClass('open'))
return;
$(this).removeClass('open');
//This will check if an input child has focus. If no then remove class open
if ($(this).find(":input:focus").length == 0){
$(this).removeClass('open');
}
});
// Tooltip