mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
fix: errors thrown by launch_app
Fixes errors that were noticed being thrown by launch_app, specifically in the branch of logic when launch_app is called NOT via ExecService. This branch of logic was added to fix an issue where notepad wasn't prompting to save unsaved changes on close because data-appusessdk was not properly set to true. The fix still worked, despite throwing these errors, because setting data-appUsesSDK to true is the first thing it does. However, broadcast messages to apps launched with launch_app NOT via ExecService would have been broken.
This commit is contained in:
parent
a9bbcf908d
commit
c22a69ffb1
@ -368,10 +368,8 @@ const launch_app = async (options)=>{
|
||||
|
||||
$(process.references.iframe).attr('data-appUsesSDK', 'true');
|
||||
|
||||
send_child_launched_msg({ uses_sdk: true });
|
||||
|
||||
// Send any saved broadcasts to the new app
|
||||
globalThis.services.get('broadcast').sendSavedBroadcastsTo(child_instance_id);
|
||||
globalThis.services.get('broadcast').sendSavedBroadcastsTo(uuid);
|
||||
|
||||
// If `window-active` is set (meanign the window is focused), focus the window one more time
|
||||
// this is to ensure that the iframe is `definitely` focused and can receive keyboard events (e.g. keydown)
|
||||
|
Loading…
Reference in New Issue
Block a user