moved scroll bottom alert

isekai-main
Barış Soner Uşaklı 1 year ago
parent ba6b3f24c0
commit 9ac8879e93

@ -266,7 +266,7 @@ define('forum/chats', [
};
Chats.addScrollBottomHandler = function (chatContent) {
chatContent.parent()
chatContent.parents('[component="chat/message/window"]')
.find('[component="chat/messages/scroll-up-alert"]')
.off('click').on('click', function () {
messages.scrollToBottom(chatContent);

@ -149,7 +149,7 @@ define('forum/chats/messages', [
messages.scrollToBottom = function (containerEl) {
if (containerEl && containerEl.length) {
containerEl.scrollTop(containerEl[0].scrollHeight - containerEl.height());
containerEl.parent()
containerEl.parents('[component="chat/message/window"]')
.find('[component="chat/messages/scroll-up-alert"]')
.addClass('hidden');
}
@ -163,7 +163,7 @@ define('forum/chats/messages', [
messages.toggleScrollUpAlert = function (containerEl) {
const isAtBottom = messages.isAtBottom(containerEl, 300);
containerEl.parent()
containerEl.parents('[component="chat/message/window"]')
.find('[component="chat/messages/scroll-up-alert"]')
.toggleClass('hidden', isAtBottom);
};

Loading…
Cancel
Save