Fade out all previous context menus when fading in a new one.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 Jul 2011 12:30:23 +0000 (14:30 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 Jul 2011 12:30:23 +0000 (14:30 +0200)
This resolves #221.

src/main/resources/static/javascript/sone.js

index b5a7a2a..29c5420 100644 (file)
@@ -858,6 +858,7 @@ function ajaxifyPost(postElement) {
 
        /* show Sone menu when hovering over the avatar. */
        $(postElement).find(".post-avatar").mouseover(function() {
+               $(".sone-menu:visible").fadeOut();
                $(".sone-post-menu", postElement).mouseleave(function() {
                        $(this).fadeOut();
                }).fadeIn();
@@ -987,6 +988,7 @@ function ajaxifyReply(replyElement) {
 
        /* show Sone menu when hovering over the avatar. */
        $(replyElement).find(".reply-avatar").mouseover(function() {
+               $(".sone-menu:visible").fadeOut();
                $(".sone-reply-menu", replyElement).mouseleave(function() {
                        $(this).fadeOut();
                }).fadeIn();