scroll to top when switching emoji tabs

pull/195/head
Aevann 2023-08-23 04:06:36 +03:00
parent ba47449685
commit 1769f7941e
2 changed files with 3 additions and 2 deletions

View File

@ -278,6 +278,8 @@ function switchEmojiTab(e)
for(const emojiDOM of Object.values(emojiDOMs))
emojiDOM.hidden = emojiDOM.dataset.className !== className;
document.getElementById('emoji-container').scrollTop = 0;
}
for (const emojitab of document.getElementsByClassName('emojitab')) {

View File

@ -49,7 +49,7 @@
</fieldset>
</div>
<div style="overflow-y: auto;">
<div id="emoji-container" style="overflow-y: auto">
<div class="modal-body p-0" id="emoji-modal-body">
<div id="no-emojis-found" class="tab-content py-3 pl-4" hidden>
No results... Next time be better with your query. 💅
@ -63,7 +63,6 @@
<img loading="lazy">
</button>
</template>
</div>
</div>
</div>