Description
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
- Go to this playground page
- Click the
shared.js
file in the sidebar - Click "Solve" and observe the browser's console error
- Click the
Counter.svelte
file in the sidebar - 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