Skip to content

Commit

Permalink
Merge pull request #807 from MuckRock/allanlasser/issue800
Browse files Browse the repository at this point in the history
Fix close handlers on PageAction modals
  • Loading branch information
allanlasser authored Nov 1, 2024
2 parents 07c2f49 + da99665 commit 1e1fcce
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/lib/components/viewer/PageActions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
{/if}
{#if editSection}
<Portal>
<Modal on:close={close}>
<Modal on:close={() => (editSection = false)}>
<h2 slot="title">
{#if section}
{$_("annotate.cta.edit-section")}
Expand All @@ -121,19 +121,23 @@
</h2>
<EditSections
{document}
on:close={close}
on:close={() => (editSection = false)}
section={section || { page_number: page_number - 1 }}
/>
</Modal>
</Portal>
{/if}
{#if pageNote}
<Portal>
<Modal on:close={close}>
<Modal on:close={() => (pageNote = false)}>
<h2 slot="title">
{$_("annotate.cta.add-note")}
</h2>
<EditNote {document} page_number={page_number - 1} on:close={close} />
<EditNote
{document}
page_number={page_number - 1}
on:close={() => (pageNote = false)}
/>
</Modal>
</Portal>
{/if}
Expand Down

0 comments on commit 1e1fcce

Please sign in to comment.