Skip to content

Tutorial "solve" button unresponsive and console errors if active file disappears #868

Closed
@dslatkin

Description

@dslatkin

Describe the bug

Under some conditions, if you have an active file in a tutorial exercise that would otherwise disappear when you click "Solve", clicking solve doesn't do anything and console errors a message. If you change to a file that will persist in the solution, then the solve button works as expected.

Reproduction

  1. Go to this playground page
  2. Click the shared.js file in the sidebar
  3. Click "Solve" and observe the browser's console error
  4. Click the Counter.svelte file in the sidebar
  5. Click "Solve" and notice that it works

Logs

utils.DjNpXng4.js:1 Uncaught Error: Invalid selection /src/lib/shared.js
    at Wk.set (Editor.BZXAGenm.js:426:10342)
    at HTMLButtonElement.toggle (25.DO2QsNE4.js:15:8330)
    at b.__click (25.DO2QsNE4.js:15:3898)
    at HTMLDivElement.N (utils.DjNpXng4.js:1:1472)

System Info

Browser version info:

Arc	130.0.6723.117 (Official Build) (arm64) 
Revision	37382504fe66965a688029d08706ddadca7ceb46-refs/branch-heads/6723@{#1765}
OS	macOS Version 15.0 (Build 24A5264n)
JavaScript	V8 13.0.245.18
User Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions