Skip to content

Commit 5df7fa7

Browse files
authored
try this (#465)
1 parent c88afe8 commit 5df7fa7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/editor/src/lib/Editor.svelte

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
}}
9191
onmessage={(e) => {
9292
if (preserve_editor_focus && e.data.type === 'iframe_took_focus') {
93-
console.log('reclaiming focus');
9493
editor_view.focus();
9594
}
9695
}}

packages/editor/src/lib/Workspace.svelte.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,11 @@ export class Workspace {
302302

303303
update_file(file: File) {
304304
if (file.name === this.#current.name) {
305-
this.#current = file;
305+
// TODO this line causes the editor to keep losign
306+
// focus and I have no idea why. It seems important,
307+
// but it also doesn't appear to break anything
308+
// if we comment it out?
309+
// this.#current = file;
306310
}
307311

308312
this.#files = this.#files.map((old) => {

0 commit comments

Comments
 (0)