From 5c70e503aa35d12b496f0ea2a50eb3e43e8f209f Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 28 Sep 2016 18:29:38 +0300 Subject: [PATCH] closes #5022 --- public/src/modules/chat.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js index 7b87b6e376..8f50ec82b0 100644 --- a/public/src/modules/chat.js +++ b/public/src/modules/chat.js @@ -26,8 +26,11 @@ define('chat', [ module.loadChatsDropdown(chatsListEl); }); - chatsListEl.on('click', '[data-roomid]', function() { - var roomId = this.getAttribute('data-roomid'); + chatsListEl.on('click', '[data-roomid]', function(ev) { + if ($(ev.target).parents('.user-link').length) { + return; + } + var roomId = $(this).attr('data-roomid'); if (!ajaxify.currentPage.match(/^chats\//)) { app.openChat(roomId); } else { @@ -339,7 +342,7 @@ define('chat', [ }); }; - module.disableMobileBehaviour = function(modalEl) { + module.disableMobileBehaviour = function() { app.toggleNavbar(true); }; @@ -347,7 +350,6 @@ define('chat', [ var totalHeight = modalEl.find('.modal-content').outerHeight() - modalEl.find('.modal-header').outerHeight(); var padding = parseInt(modalEl.find('.modal-body').css('padding-top'), 10) + parseInt(modalEl.find('.modal-body').css('padding-bottom'), 10); var contentMargin = parseInt(modalEl.find('.chat-content').css('margin-top'), 10) + parseInt(modalEl.find('.chat-content').css('margin-bottom'), 10); - var sinceHeight = modalEl.find('.since-bar').outerHeight(true); var inputGroupHeight = modalEl.find('.input-group').outerHeight(); return totalHeight - padding - contentMargin - inputGroupHeight;