mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-23 07:53:00 +01:00
fix: dont focus twice, only focus on chat input on desktop
dont wrap widget footer in row
This commit is contained in:
@@ -57,10 +57,6 @@ define('forum/chats', [
|
||||
messages.scrollToBottom($('.expanded-chat ul.chat-content'));
|
||||
|
||||
search.init();
|
||||
|
||||
if (ajaxify.data.hasOwnProperty('roomId')) {
|
||||
components.get('chat/input').focus();
|
||||
}
|
||||
};
|
||||
|
||||
Chats.addEventListeners = function () {
|
||||
@@ -527,7 +523,9 @@ define('forum/chats', [
|
||||
if (ajaxify.data.roomId) {
|
||||
socket.emit('modules.chats.markRead', ajaxify.data.roomId);
|
||||
$('[data-roomid="' + ajaxify.data.roomId + '"]').toggleClass('unread', false);
|
||||
$('.expanded-chat [component="chat/input"]').focus();
|
||||
if (!utils.isMobile()) {
|
||||
$('.expanded-chat [component="chat/input"]').focus();
|
||||
}
|
||||
}
|
||||
$('.chats-list li').removeClass('active');
|
||||
$('.chats-list li[data-roomid="' + ajaxify.data.roomId + '"]').addClass('active');
|
||||
|
||||
@@ -22,7 +22,7 @@ module.exports.render = function (template) {
|
||||
return;
|
||||
}
|
||||
if (location === 'footer' && !$('#content [widget-area="footer"],#content [data-widget-area="footer"]').length) {
|
||||
$('#content').append($('<div class="row"><div data-widget-area="footer" class="col-12"></div></div>'));
|
||||
$('#content').append($('<div data-widget-area="footer"></div>'));
|
||||
} else if (location === 'sidebar' && !$('#content [widget-area="sidebar"],#content [data-widget-area="sidebar"]').length) {
|
||||
if ($('[component="account/cover"]').length) {
|
||||
$('[component="account/cover"]').nextAll().wrapAll($('<div class="row"><div class="col-lg-9 col-12"></div><div data-widget-area="sidebar" class="col-lg-3 col-12"></div></div></div>'));
|
||||
|
||||
Reference in New Issue
Block a user