mirror of
https://github.com/Microsoft/vscode
synced 2024-08-25 03:56:03 +00:00
workaround cyclic JSON issue in DropdownWithDefaultActionViewItem
This commit is contained in:
parent
a56263156d
commit
62b53d5646
|
@ -5,7 +5,7 @@
|
|||
|
||||
import 'vs/css!./menuEntryActionViewItem';
|
||||
import { addDisposableListener, asCSSUrl, ModifierKeyEmitter, append, EventType, $, prepend } from 'vs/base/browser/dom';
|
||||
import { IAction, IRunEvent, Separator, SubmenuAction } from 'vs/base/common/actions';
|
||||
import { ActionRunner, IAction, IRunEvent, Separator, SubmenuAction } from 'vs/base/common/actions';
|
||||
import { IDisposable, toDisposable, MutableDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { localize } from 'vs/nls';
|
||||
import { ICommandAction, IMenu, IMenuActionOptions, MenuItemAction, SubmenuItemAction, Icon, IMenuService } from 'vs/platform/actions/common/actions';
|
||||
|
@ -359,6 +359,11 @@ class DropdownWithDefaultActionViewItem extends BaseActionViewItem {
|
|||
|
||||
this._defaultAction.dispose();
|
||||
this._defaultAction = this._instaService.createInstance(MenuEntryActionViewItem, lastAction, undefined);
|
||||
this._defaultAction.actionRunner = new (class ActionRunner2 extends ActionRunner {
|
||||
override async runAction(action: IAction, context?: unknown): Promise<void> {
|
||||
await action.run(undefined);
|
||||
}
|
||||
})();
|
||||
|
||||
if (this._container) {
|
||||
this._defaultAction.render(prepend(this._container, $('.action-container')));
|
||||
|
|
Loading…
Reference in a new issue