Add keyed blocks to enhance MangaPage reactivity
Keyed blocks improve DOM update handling. This improves compatibility with some language learning extensions. For example, this prevents Migaku from persisting textboxes from previous pages as one pages through their comics.
This commit is contained in:
@@ -345,10 +345,12 @@
|
|||||||
role="none"
|
role="none"
|
||||||
id="manga-panel"
|
id="manga-panel"
|
||||||
>
|
>
|
||||||
{#if showSecondPage()}
|
{#key page}
|
||||||
<MangaPage page={pages[index + 1]} src={Object.values(volume?.files)[index + 1]} />
|
{#if showSecondPage()}
|
||||||
{/if}
|
<MangaPage page={pages[index + 1]} src={Object.values(volume?.files)[index + 1]} />
|
||||||
<MangaPage page={pages[index]} src={Object.values(volume?.files)[index]} />
|
{/if}
|
||||||
|
<MangaPage page={pages[index]} src={Object.values(volume?.files)[index]} />
|
||||||
|
{/key}
|
||||||
</div>
|
</div>
|
||||||
</Panzoom>
|
</Panzoom>
|
||||||
</div>
|
</div>
|
||||||
@@ -370,4 +372,4 @@
|
|||||||
<div class="fixed z-50 left-1/2 top-1/2">
|
<div class="fixed z-50 left-1/2 top-1/2">
|
||||||
<Spinner />
|
<Spinner />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
Reference in New Issue
Block a user