@lvce-editor/quick-pick-worker 4.24.1 → 4.24.3

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.
@@ -4271,6 +4271,13 @@ const selectIndex = async (state, index, button = /* left */0) => {
4271
4271
  void fn(pick, value, state.applicationId);
4272
4272
  return state;
4273
4273
  }
4274
+ // Restore the editor focus before a builtin command opens or focuses another view.
4275
+ // Closing afterward can steal that view's focus while the user is already typing.
4276
+ const commandId = pick.id;
4277
+ const closeBeforeBuiltin = subId === Commands$1 && shouldHide(pick) && commandId !== 'QuickPick.showColorTheme' && commandId !== 'QuickPick.changeLanguageMode';
4278
+ if (closeBeforeBuiltin) {
4279
+ await closeWidget(state.uid);
4280
+ }
4274
4281
  const selectPickResult = await fn(pick, value, state.applicationId);
4275
4282
  object(selectPickResult);
4276
4283
  string(selectPickResult.command);
@@ -4279,7 +4286,9 @@ const selectIndex = async (state, index, button = /* left */0) => {
4279
4286
  } = selectPickResult;
4280
4287
  switch (command) {
4281
4288
  case Hide:
4282
- await closeWidget(state.uid);
4289
+ if (!closeBeforeBuiltin) {
4290
+ await closeWidget(state.uid);
4291
+ }
4283
4292
  if (selectPickResult.itemCommand) {
4284
4293
  await invoke$3(selectPickResult.itemCommand, ...(selectPickResult.itemCommandArgs || []));
4285
4294
  }
@@ -5249,7 +5258,9 @@ const renderEventListeners = () => {
5249
5258
  }, {
5250
5259
  name: HandleScrollbarPointerDown,
5251
5260
  params: ['handleScrollBarPointerDown', 'event.clientY', 'event.pointerId'],
5252
- preventDefault: true
5261
+ preventDefault: true,
5262
+ stopPropagation: true,
5263
+ trackPointerEvents: [HandleScrollbarPointerMove, HandleScrollbarPointerUp]
5253
5264
  }, {
5254
5265
  name: HandleScrollbarPointerMove,
5255
5266
  params: ['handleScrollBarPointerMove', 'event.clientY', 'event.pointerId'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/quick-pick-worker",
3
- "version": "4.24.1",
3
+ "version": "4.24.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/quick-pick-worker.git"