diff --git a/client/css/style.css b/client/css/style.css index e37662ba..263c9e6e 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -1204,7 +1204,7 @@ kbd { color: #50a656; } -#chat .user:hover { +.chat .user:hover { opacity: 0.6; } diff --git a/client/js/userlist.js b/client/js/userlist.js index d7bb9c33..faf9ffb9 100644 --- a/client/js/userlist.js +++ b/client/js/userlist.js @@ -39,6 +39,19 @@ chat.on("input", ".users .search", function() { container.html(templates.user_filtered({matches: result})).show(); }); +chat.on("mouseenter", ".users .user", function() { + // Reset any potential selection, this is required in cas there is already a + // nick previously selected by keyboard + $(".users .user").removeClass("active"); + + $(this).addClass("active"); +}); + +chat.on("mouseleave", ".users .user", function() { + // Reset any potential selection + $(".users .user").removeClass("active"); +}); + exports.handleKeybinds = function(input) { Mousetrap(input.get(0)).bind(["up", "down"], (_e, key) => { const userlists = input.closest(".users");