src/vs/workbench/browser/parts/titlebar/menubarControl.ts/CustomMenubarControl/registerListeners
class CustomMenubarControl:	protected override registerListeners(): void {
		super.registerListeners();

		this._register(addDisposableListener(window, EventType.RESIZE, () => {
			if (this.menubar && !(isIOS && BrowserFeatures.pointerEvents)) {
				this.menubar.blur();
			}
		}));

		// Mnemonics require fullscreen in web
		if (isWeb) {
			this._register(this.layoutService.onDidChangeFullscreen(e => this.updateMenubar()));
			this._register(this.webNavigationMenu.onDidChange(() => this.updateMenubar()));
		}
	}