gfds
This commit is contained in:
@@ -4016,12 +4016,8 @@ class CommentSystem {
|
|||||||
|
|
||||||
// Always kick off a load on first click (lazy — noop if already loading/cached)
|
// Always kick off a load on first click (lazy — noop if already loading/cached)
|
||||||
if (!CommentSystem.emojiCache && !CommentSystem.loadingEmojis) {
|
if (!CommentSystem.emojiCache && !CommentSystem.loadingEmojis) {
|
||||||
this.loadEmojis(true).then(() => {
|
this.loadEmojis(true);
|
||||||
// Rebuild picker content once emojis arrive (if picker already open)
|
// onReady listener (set up during picker creation) handles populating
|
||||||
if (picker && picker.style.display !== 'none') {
|
|
||||||
buildPickerContent();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If picker already exists, toggle visibility
|
// If picker already exists, toggle visibility
|
||||||
@@ -4034,7 +4030,7 @@ class CommentSystem {
|
|||||||
closeHandler = null;
|
closeHandler = null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Rebuild content in case emojis loaded since the picker was first created
|
// Rebuild content only if the cache has been updated since last build
|
||||||
buildPickerContent();
|
buildPickerContent();
|
||||||
picker.style.display = ''; // Reset to CSS default (flex)
|
picker.style.display = ''; // Reset to CSS default (flex)
|
||||||
requestAnimationFrame(() => picker.scrollIntoView({ behavior: 'smooth', block: 'nearest' }));
|
requestAnimationFrame(() => picker.scrollIntoView({ behavior: 'smooth', block: 'nearest' }));
|
||||||
|
|||||||
Reference in New Issue
Block a user