mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
💄
This commit is contained in:
@@ -413,16 +413,15 @@ export class CodeApplication extends Disposable {
|
||||
this.auxiliaryWindowsMainService?.registerWindow(contents);
|
||||
}
|
||||
|
||||
// Block any in-page navigation
|
||||
// Handle any in-page navigation
|
||||
contents.on('will-navigate', event => {
|
||||
// Allow navigation in integrated browser views
|
||||
if (BrowserViewMainService.isBrowserViewWebContents(contents)) {
|
||||
return;
|
||||
return; // Allow navigation in integrated browser views
|
||||
}
|
||||
|
||||
this.logService.error('webContents#will-navigate: Prevented webcontent navigation');
|
||||
|
||||
event.preventDefault();
|
||||
event.preventDefault(); // Prevent any in-page navigation
|
||||
});
|
||||
|
||||
// All Windows: only allow about:blank auxiliary windows to open
|
||||
|
||||
@@ -164,6 +164,10 @@ export class BrowserEditorInput extends EditorInput {
|
||||
return this._model ? this._model.url : this._initialData.url;
|
||||
}
|
||||
|
||||
override canReopen(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
override matches(otherInput: EditorInput | IUntypedEditorInput): boolean {
|
||||
if (super.matches(otherInput)) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user