@lvce-editor/renderer-process 30.64.4 → 30.64.6

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.
@@ -1527,14 +1527,13 @@ const launchWorker = async ({
1527
1527
  url
1528
1528
  }) => {
1529
1529
  const generation = getGeneration();
1530
- const trackedWorker = createRuntimeName(name);
1531
1530
  try {
1532
1531
  const rpc = await create$D({
1533
1532
  commandMap: commandMapRef,
1534
- name: trackedWorker.runtimeName,
1533
+ name,
1535
1534
  url
1536
1535
  });
1537
- trackRpc(rpc, generation, trackedWorker);
1536
+ trackRpc(rpc, generation);
1538
1537
  return success(rpc);
1539
1538
  } catch (error) {
1540
1539
  return error$1(error);
@@ -7779,8 +7778,22 @@ const handleFocus$2 = event => {
7779
7778
  state$6.codingFocus = new WeakRef(target);
7780
7779
  }
7781
7780
  };
7781
+ const handleFocusOut$2 = event => {
7782
+ const address = event.target;
7783
+ if (!(address instanceof HTMLInputElement) || address.name !== 'simple-browser-address') return;
7784
+ // Native WebContents focus can leave activeElement pointing at this input.
7785
+ // Defer so reparenting or a newer focus choice can preserve its selection.
7786
+ setTimeout(() => {
7787
+ const document = address.ownerDocument;
7788
+ if (!address.isConnected || document.hasFocus() && document.activeElement === address) return;
7789
+ clearTimeout(pendingSelections.get(address));
7790
+ pendingSelections.delete(address);
7791
+ address.setSelectionRange(0, 0);
7792
+ });
7793
+ };
7782
7794
  const listen = () => {
7783
7795
  document.addEventListener('focusin', handleFocus$2);
7796
+ document.addEventListener('focusout', handleFocusOut$2);
7784
7797
  };
7785
7798
  const restoreCodingFocus$1 = () => {
7786
7799
  const target = state$6.codingFocus?.deref();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.64.4",
3
+ "version": "30.64.6",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"