FIX: fixes for the emnote menu
This commit is contained in:
parent
7bb0175648
commit
02108ce977
6 changed files with 5 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
|||
<script lang="typescript">
|
||||
import MenuIcon from "./Menu/MenuIcon.svelte";
|
||||
import {menuIconVisiblilityStore, menuVisiblilityStore} from "../Stores/MenuStore";
|
||||
import {emoteMenuVisiblilityStore} from "../Stores/EmoteStore";
|
||||
import {emoteMenuStore} from "../Stores/EmoteStore";
|
||||
import {enableCameraSceneVisibilityStore} from "../Stores/MediaStore";
|
||||
import CameraControls from "./CameraControls.svelte";
|
||||
import MyCamera from "./MyCamera.svelte";
|
||||
|
@ -113,7 +113,7 @@
|
|||
<Menu></Menu>
|
||||
</div>
|
||||
{/if}
|
||||
{#if $emoteMenuVisiblilityStore}
|
||||
{#if $emoteMenuStore}
|
||||
<div>
|
||||
<EmoteMenu></EmoteMenu>
|
||||
</div>
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue