From c48c7b54862db3080034392758b391ab6ab61e8e Mon Sep 17 00:00:00 2001 From: touffies Date: Tue, 22 Oct 2013 22:44:35 +0200 Subject: [PATCH] issues/45 : Check if an input field has focus on the mini login form, if no we hide the form --- templates/default/assets/js/script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/default/assets/js/script.js b/templates/default/assets/js/script.js index fef4e23f5..7080ffebd 100644 --- a/templates/default/assets/js/script.js +++ b/templates/default/assets/js/script.js @@ -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