mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Do not hide context menu when relayout happens on iPadOS.
Co-authored-by: penlv@microsoft.com Co-authored-by: sbatten@microsoft.com
This commit is contained in:
@@ -7,6 +7,7 @@ import 'vs/css!./contextview';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { IDisposable, toDisposable, Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { Range } from 'vs/base/common/range';
|
||||
import { BrowserFeatures } from 'vs/base/browser/canIUse';
|
||||
|
||||
export interface IAnchor {
|
||||
x: number;
|
||||
@@ -178,7 +179,7 @@ export class ContextView extends Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.delegate!.canRelayout === false) {
|
||||
if (this.delegate!.canRelayout === false && !BrowserFeatures.pointerEvents) {
|
||||
this.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ import { IElectronService } from 'vs/platform/electron/node/electron';
|
||||
import { optional } from 'vs/platform/instantiation/common/instantiation';
|
||||
// tslint:disable-next-line: import-patterns layering TODO@sbatten
|
||||
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService';
|
||||
import { BrowserFeatures } from 'vs/base/browser/canIUse';
|
||||
|
||||
export abstract class MenubarControl extends Disposable {
|
||||
|
||||
@@ -673,7 +674,7 @@ export class CustomMenubarControl extends MenubarControl {
|
||||
}
|
||||
|
||||
this._register(DOM.addDisposableListener(window, DOM.EventType.RESIZE, () => {
|
||||
if (this.menubar) {
|
||||
if (this.menubar && !BrowserFeatures.pointerEvents) {
|
||||
this.menubar.blur();
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user