mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
fixed chatModal centering
This commit is contained in:
@@ -264,7 +264,7 @@ define('chat', ['taskbar', 'string', 'sounds', 'forum/chats'], function(taskbar,
|
|||||||
|
|
||||||
module.center = function(chatModal) {
|
module.center = function(chatModal) {
|
||||||
chatModal.css("left", Math.max(0, (($(window).width() - $(chatModal).outerWidth()) / 2) + $(window).scrollLeft()) + "px");
|
chatModal.css("left", Math.max(0, (($(window).width() - $(chatModal).outerWidth()) / 2) + $(window).scrollLeft()) + "px");
|
||||||
chatModal.css("top", Math.max(0, $(window).height() / 4 - $(chatModal).outerHeight() / 2));
|
chatModal.css("top", Math.max(0, $(window).height() / 2 - $(chatModal).outerHeight() / 2) + "px");
|
||||||
chatModal.css("zIndex", 100);
|
chatModal.css("zIndex", 100);
|
||||||
chatModal.find('#chat-message-input').focus();
|
chatModal.find('#chat-message-input').focus();
|
||||||
return chatModal;
|
return chatModal;
|
||||||
|
|||||||
Reference in New Issue
Block a user