mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Fix editor dropdowns (#1649)
This commit is contained in:
parent
c0d47e18b7
commit
30427fb540
1 changed files with 5 additions and 2 deletions
|
@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
|
|||
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import { createEventDispatcher, onMount } from "svelte";
|
||||
|
||||
export let container: HTMLElement;
|
||||
export let image: HTMLImageElement;
|
||||
|
@ -43,10 +43,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
let selectionRef: HTMLDivElement;
|
||||
function initSelection(selection: HTMLDivElement): void {
|
||||
setSelection();
|
||||
dispatch("mount", { selection });
|
||||
selectionRef = selection;
|
||||
}
|
||||
|
||||
onMount(() => dispatch("mount", { selection: selectionRef }));
|
||||
</script>
|
||||
|
||||
<div
|
||||
|
|
Loading…
Reference in a new issue