1
I am developing this site and for now I have not put any Javascript code in it to make it dynamic.
I have a problem that repeats itself in all projects for lack of knowledge of language and logic, following problem:
When I put the mouse on top of the menu, opens sub-menu but when taking the mouse off the menu to try to access the sub-menu like the menu loses focus, the sub-menu disappears before I focus on any of his items.
Every time I end up solving with gambiarra but I would like to understand the logic of solving this.
The code is normal:
<ul class="menu">
<li>
<a href="#">Categoria</a>
<ul class="sub-menu">
<li>Sucategoria</li>
</ul>
</li>
</ul>
Typical menu of Wordpress.
I noticed that this happens mainly if the sub-menu has at a margin of menu, problem that may run by the fact of sub-menu need to gain focus immediately after menu lose focus.
Could you try putting a
setTimeoutto perform its function that makes the menu disappear after the eventonfocusoutmenu– MarceloBoni
I believe that you are working on the site, because the mouseover is not working and has a sub-menu that does not disappear, instead of links use the Stacksnippet and post an example of the problem, read: http://answall.com/help/mcve
– Guilherme Nascimento