@lvce-editor/explorer-view 7.24.0 → 7.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2485,6 +2485,11 @@ const validateFileName2 = (name, siblingFileNames = []) => {
2485
2485
  return '';
2486
2486
  };
2487
2487
 
2488
+ const focusEditorAfterExplorerRender = () => {
2489
+ setTimeout(() => {
2490
+ void invoke$3('Main.focus');
2491
+ }, 0);
2492
+ };
2488
2493
  const acceptCreate = async (state, newDirentType) => {
2489
2494
  const {
2490
2495
  editingValue,
@@ -2524,12 +2529,13 @@ const acceptCreate = async (state, newDirentType) => {
2524
2529
  await refreshWorkspace();
2525
2530
  if (newDirentType === File) {
2526
2531
  await openUri(absolutePath, true);
2532
+ focusEditorAfterExplorerRender();
2527
2533
  }
2528
2534
  return {
2529
2535
  ...state,
2530
2536
  editingIndex: -1,
2531
2537
  editingType: None$6,
2532
- focus: List,
2538
+ focus: newDirentType === File ? None$5 : List,
2533
2539
  focusedIndex: newFocusedIndex,
2534
2540
  items: dirents
2535
2541
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/explorer-view",
3
- "version": "7.24.0",
3
+ "version": "7.24.1",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",