Skip to content

Node.js based forum software built for the modern web

vertically centering modal when opened

Julian Lamcac3ebc9e510
diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js
index bd251561f2..7250ba3a3d 100644
--- a/public/src/modules/chat.js
+++ b/public/src/modules/chat.js
@@ -244,7 +244,7 @@ define('chat', ['taskbar', 'string', 'sounds', 'forum/chats'], function(taskbar,
module.center = function(chatModal) {
chatModal.css("left", Math.max(0, (($(window).width() - $(chatModal).outerWidth()) / 2) + $(window).scrollLeft()) + "px");
- chatModal.css("top", "0px");
+ chatModal.css("top", $(window).height() / 4 - $(chatModal).outerHeight() / 2);
chatModal.css("zIndex", 2000);
chatModal.find('#chat-message-input').focus();
return chatModal;