FIX: fixes for the emnote menu

This commit is contained in:
Kharhamel 2021-10-04 11:23:30 +02:00
parent 7bb0175648
commit 02108ce977
6 changed files with 5 additions and 19 deletions

View file

@ -20,6 +20,8 @@
emojisPerRow: isMobile() ? 6 : 8,
autoFocusSearch: false
});
//the timeout is here to prevent the menu from flashing
setTimeout(() => picker.showPicker(emojiContainer), 100);
picker.on("emoji", (selection) => {
emoteStore.set(selection.emoji);
@ -29,13 +31,6 @@
emoteMenuStore.closeEmoteMenu();
});
unsubscriber = emoteMenuStore.subscribe((isEmoteMenuVisible) => {
if (isEmoteMenuVisible && !picker.isPickerVisible()) {
picker.showPicker(emojiContainer);
} else {
picker.hidePicker();
}
})
})
function onKeyDown(e:KeyboardEvent) {