Skip to content

next.168 broke unmounting content in my app #12247

Closed as not planned
Closed as not planned
@kjk

Description

@kjk

Describe the bug

things work with 167, after upgrading to 168 the following:

{#if showingNoteSelector}
  <Overlay onclose={closeNoteSelector} blur={true}>
    <NoteSelector
      {switchToCommandPalette}
      openNote={onOpenNote}
      createNote={onCreateNote}
      deleteNote={onDeleteNote}
    />
  </Overlay>
{/if}

stops working i.e. when showingNoteSelector goes from false to true, it does render the content as expected.

Going from true to false doesn't unmount the Overlay.

I have:

  $effect(() => {
    console.log("showingNoteSelector changed to:", showingNoteSelector);
  });

so I can tell that showingNoteSelector gets set to false but the Overlay remains on screen i.e. is not unmounted.

Reproduction

  • git checkout https://github.com/kjk/edna
  • cd edna
  • verify package.json has svelte at 5.0.0-next.167.
  • bun install
  • bun run dev
  • http://localhost:3035/

Verify that 167 works:

  • right-click for context menu, Open note menu item
  • click outside dialog, it should get dismissed

Verify that 168 breaks:

  • kill the app
  • inpackage.json and set svelte to 5.0.0-next.168
  • bun install --verbose (--verbose to ensure that 168 is installed)
  • bun run dev
  • http://localhost:3035/
  • right-click for context menu, Open note menu item
  • click outside dialog

Dialog should get dismissed but isn't.

In console logs you should see a log that says showingNoteSelector changed to: false

The code in this particular scenario is closeNoteSelector() in App.svelte that simply does showingNoteSelector = false;

You can replace bun with equivalent npm or yarn commands.

Logs

No response

System Info

Windows 11, latest Chrome

Severity

blocking all usage of svelte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions