Added Unix-like chat clear keybindings. Now only clears the chat if the main input is focused.

This commit is contained in:
William Boman 2014-09-19 13:52:36 +02:00
parent ab80c91054
commit 2d618969e4

View File

@ -568,9 +568,14 @@ $(function() {
});
Mousetrap.bind([
"command+k"
], function (e, keys) {
chat.find(".active .chat .messages").empty();
"command+k",
"ctrl+l",
"ctrl+shift+l"
], function (e) {
// Only clear the chat if the main input is focused.
if( e.target === input[0] ) {
chat.find(".active .chat .messages").empty();
}
});
function complete(word) {