mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 02:52:20 -05:00
Merge pull request #75967 from jeanp413/fix-75947
Stop event propagation in `onEditSettingClicked`
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ContextSubMenu } from 'vs/base/browser/contextmenu';
|
||||
import { getDomNodePagePosition } from 'vs/base/browser/dom';
|
||||
import { EventHelper, getDomNodePagePosition } from 'vs/base/browser/dom';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { Delayer } from 'vs/base/common/async';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
@@ -820,6 +820,8 @@ class EditSettingRenderer extends Disposable {
|
||||
}
|
||||
|
||||
private onEditSettingClicked(editPreferenceWidget: EditPreferenceWidget<IIndexedSetting>, e: IEditorMouseEvent): void {
|
||||
EventHelper.stop(e.event, true);
|
||||
|
||||
const anchor = { x: e.event.posx, y: e.event.posy + 10 };
|
||||
const actions = this.getSettings(editPreferenceWidget.getLine()).length === 1 ? this.getActions(editPreferenceWidget.preferences[0], this.getConfigurationsMap()[editPreferenceWidget.preferences[0].key])
|
||||
: editPreferenceWidget.preferences.map(setting => new ContextSubMenu(setting.key, this.getActions(setting, this.getConfigurationsMap()[setting.key])));
|
||||
|
||||
Reference in New Issue
Block a user