diff --git a/src/gui/src/UI/UIWindow.js b/src/gui/src/UI/UIWindow.js index 8c481c5f6..d777ab591 100644 --- a/src/gui/src/UI/UIWindow.js +++ b/src/gui/src/UI/UIWindow.js @@ -601,7 +601,7 @@ async function UIWindow(options) { } // focus on this window and deactivate other windows if ( options.is_visible ) { - $(el_window).focusWindow(); + $(el_window).focusWindow() } if (window.animate_window_opening) { @@ -1523,7 +1523,9 @@ async function UIWindow(options) { el_window_app_iframe.contentWindow.postMessage({msg: "drop", x: (window.mouseX - rect.left), y: (window.mouseY - rect.top), items: items}, '*'); // bring focus to this window - $(el_window).focusWindow(); + if (options.is_visible) { + $(el_window).focusWindow() + } } // if this window is not a directory, cancel drop. @@ -1666,8 +1668,9 @@ async function UIWindow(options) { clearTimeout(drag_enter_timeout); // If items are dragged over this window long enough, bring it to front drag_enter_timeout = setTimeout(function(){ - // focus window - $(el_window).focusWindow(); + if (options.is_visible) { + $(el_window).focusWindow() + } }, 1400); }, leave: function (dragsterEvent, event) { diff --git a/src/gui/src/helpers/launch_app.js b/src/gui/src/helpers/launch_app.js index 66e226556..396ca0173 100644 --- a/src/gui/src/helpers/launch_app.js +++ b/src/gui/src/helpers/launch_app.js @@ -422,7 +422,7 @@ const launch_app = async (options)=>{ // Send any saved broadcasts to the new app 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 (meaning 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) if($(process.references.el_win).hasClass('window-active')){ $(process.references.el_win).focusWindow();