actual proper placement, styling, timing for avatar popup

This commit is contained in:
RossAscends
2023-05-02 03:28:21 +09:00
parent bc79efd0ef
commit 32b4a209e2
2 changed files with 6 additions and 7 deletions

View File

@ -5385,7 +5385,7 @@ $(document).ready(function () {
$(document).on('click', '.mes .avatar', function () {
$('#avatar_zoom_popup').css('display', 'none');
let thumbURL = $(this).children('img').attr('src');
let charsPath = '/characters/'
let targetAvatarImg = thumbURL.substring(thumbURL.lastIndexOf("=") + 1);
@ -5402,9 +5402,11 @@ $(document).ready(function () {
let avatarPopper = Popper.createPopper(document.getElementById('top-bar'), document.getElementById('avatar_zoom_popup'), {
placement: 'bottom',
});
avatarPopper.update();
$('#avatar_zoom_popup').toggle();
setTimeout(function () {
avatarPopper.update();
$('#avatar_zoom_popup').toggle();
}, 100);