From a70db885cf796de6b53b4deca297dd32e51c8184 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 10 Jan 2019 16:46:08 -0500 Subject: [PATCH] fix: #7216, hide taskbar on chat modal invocation on mobile --- public/src/modules/chat.js | 2 ++ public/src/modules/taskbar.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js index d952d6abbc..dab081e0cd 100644 --- a/public/src/modules/chat.js +++ b/public/src/modules/chat.js @@ -297,6 +297,7 @@ define('chat', [ module.enableMobileBehaviour = function (modalEl) { app.toggleNavbar(false); + taskbar.toggleVisibility(false); modalEl.attr('data-mobile', '1'); var messagesEl = modalEl.find('.modal-body'); messagesEl.css('height', module.calculateChatListHeight(modalEl)); @@ -308,6 +309,7 @@ define('chat', [ module.disableMobileBehaviour = function () { app.toggleNavbar(true); + taskbar.toggleVisibility(true); }; module.calculateChatListHeight = function (modalEl) { diff --git a/public/src/modules/taskbar.js b/public/src/modules/taskbar.js index d285756391..7a979c8db8 100644 --- a/public/src/modules/taskbar.js +++ b/public/src/modules/taskbar.js @@ -182,5 +182,9 @@ define('taskbar', ['benchpress', 'translator'], function (Benchpress, translator taskbar.tasklist.find('[data-module="' + module + '"][data-uuid="' + uuid + '"] [component="taskbar/title"]').text(newTitle); }; + taskbar.toggleVisibility = function (visible) { + taskbar.taskbar.toggleClass('hidden', !visible); + }; + return taskbar; });