fix: don't set delegate for QLPreviewPanel (#37578)

fix: don't set delegate for QLPreviewPanel

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Spiegel <jeremy.spiegel@frontapp.com>
This commit is contained in:
trop[bot]
2023-03-20 20:17:30 -04:00
committed by GitHub
parent 7da962fb82
commit 080fb8e648
2 changed files with 16 additions and 2 deletions

View File

@@ -5251,6 +5251,22 @@ describe('BrowserWindow module', () => {
w.closeFilePreview();
}).to.not.throw();
});
it('should not call BrowserWindow show event', async () => {
const w = new BrowserWindow({ show: false });
const shown = emittedOnce(w, 'show');
w.show();
await shown;
let showCalled = false;
w.on('show', () => {
showCalled = true;
});
w.previewFile(__filename);
await delay(500);
expect(showCalled).to.equal(false, 'should not have called show twice');
});
});
// TODO (jkleinsc) renable these tests on mas arm64