@lvce-editor/renderer-process 6.9.0 → 6.10.0

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.
@@ -7317,10 +7317,16 @@ const setSelections$1 = (state, cursorInfos, selectionInfos) => {
7317
7317
  setCursors(state, cursorInfos);
7318
7318
  setSelections$2(state, selectionInfos);
7319
7319
  };
7320
- const setFocused$3 = (state, isFocused) => {
7320
+ const setFocused$3 = async (state, isFocused) => {
7321
7321
  const {
7322
7322
  $EditorInput
7323
7323
  } = state;
7324
+ let tries = 0;
7325
+ while (!$EditorInput.isConnected && tries++ < 1000) {
7326
+ await new Promise(resolve => {
7327
+ requestAnimationFrame(resolve);
7328
+ });
7329
+ }
7324
7330
  if (!$EditorInput.isConnected) {
7325
7331
  warn('unmounted editor cannot be focused');
7326
7332
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "6.9.0",
3
+ "version": "6.10.0",
4
4
  "description": "",
5
5
  "main": "dist/diffWorkerMain.js",
6
6
  "type": "module",