From 341ce457454b75d6a9882753ac322e942e64b460 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Tue, 19 Apr 2022 13:53:51 -0600 Subject: [PATCH] folder now selects after creation --- scripts/contextmenu/newfolder.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/contextmenu/newfolder.js b/scripts/contextmenu/newfolder.js index 25913af..6080924 100755 --- a/scripts/contextmenu/newfolder.js +++ b/scripts/contextmenu/newfolder.js @@ -9,6 +9,7 @@ const showError = require('../modal/common/error'); const clearModals = require('../modal/clearmodals'); const newToast = require('../toast/createtoast'); const refresh = require('../fileview/refresh'); +const selectFolder = require('../fileview/selectfolder'); module.exports = () => { if (window.kade.modal) {return;} @@ -64,6 +65,10 @@ module.exports = () => { newToast("Copied!", "The folder's path has been copied to your clipboard.", "#19df46"); } ); + setTimeout(() => { + selectFolder(input.value); + setTimeout(() => window.kade.cl.click(), 100); + }, 100); } catch { newToast("Folder not Created", "An error caused that folder to not be created.", "#b24355", false, 5, () => {showError("Folder Creation", "There was an unknown error while trying to create that folder. It may be a permissions issue, or the host folder doesn't exist anymore.");}); clearModals();