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:
KernelDeimos 2024-10-26 03:07:02 -04:00
parent a9bbcf908d
commit c22a69ffb1

View File

@ -368,10 +368,8 @@ const launch_app = async (options)=>{
$(process.references.iframe).attr('data-appUsesSDK', 'true'); $(process.references.iframe).attr('data-appUsesSDK', 'true');
send_child_launched_msg({ uses_sdk: true });
// Send any saved broadcasts to the new app // 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 // 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) // this is to ensure that the iframe is `definitely` focused and can receive keyboard events (e.g. keydown)