Edito tweaks (auto correct on)

This commit is contained in:
Zef Hemel
2022-05-09 10:45:36 +02:00
parent 7e221ce5aa
commit 35dc75d94e
2 changed files with 12 additions and 3 deletions
+4 -1
View File
@@ -54,7 +54,10 @@ export function editorSyscalls(editor: Editor): SysCallMapping {
await editor.reloadPage();
},
"editor.openUrl": async (ctx, url: string) => {
window.open(url, "_blank")!.focus();
let win = window.open(url, "_blank");
if (win) {
win.focus();
}
},
"editor.flashNotification": (ctx, message: string) => {
editor.flashNotification(message);