[Kimchi-devel] [PATCH] Bug #361. Network Action Dropdown does not Disappear when mouse out

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed Apr 2 14:00:06 UTC 2014


Reviewed-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>

I tested in Firefox, Fedora20. This patch fixes the problem.
However, I would like to notice that the behaviour is not the same like 
other tabs:
     - guest, templates, storage tabs: drop-down menu remain opened 
until user click click in something else, like the "+" button
     - network tab: drop-down menu remain opened only if user keeps 
mouse on it.


On 04/02/2014 06:20 AM, huoyuxin at linux.vnet.ibm.com wrote:
> From: Yu Xin Huo <huoyuxin at linux.vnet.ibm.com>
>
> Signed-off-by: Yu Xin Huo <huoyuxin at linux.vnet.ibm.com>
> ---
>   ui/js/src/kimchi.network.js |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
> index 1642b99..9fa8324 100644
> --- a/ui/js/src/kimchi.network.js
> +++ b/ui/js/src/kimchi.network.js
> @@ -149,6 +149,9 @@ kimchi.addNetworkActions = function(network) {
>       }).click(function() {
>           $(".menu-container", "#" + network.name).toggle();
>           window.scrollBy(0, 150);
> +    }).mouseleave(function() {
> +        var delay = setTimeout(function(){$(".menu-container", "#"+network.name).toggle(false);}, 500);
> +        $(".menu-container", "#"+network.name).mouseenter(function(){clearTimeout(delay);});
>       });
>       $(".menu-container", "#" + network.name).mouseleave(function() {
>           $(".menu-container", "#" + network.name).toggle(false);




More information about the Kimchi-devel mailing list