capacitor-community / capacitor-community/electron

BrowserWindow options not get reflected after changing 2nd time

Open
#205 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
398
Forks
63
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I have created a blank angular project and used the plugin
Once I set the BrowserWindow option fullscreen to true it applies and removed the windows close/minimize/maximize buttons and frame
after that again if I remove fullscreen: true option from BrowserWindow and run below command
npx cap open @capacitor-community/electron
it does not apply the BrowserWindow options and the electron app remains in full screen and cannot see frame and close/minimize/maximize buttons

**To Reproduce**
Steps to reproduce the behavior:

1. ng new demo
2. npm i @capacitor/core
3. npm i @capacitor/cli --save-dev
4. npm i @capacitor-community/electron
5. npx cap init
6. Go to Angular.json and change outputPath to 'www'
7. In capacitor.config.ts change webDir value to 'www'
8. ng build
9. npx cap add @capacitor-community/electron
10. npx cap open @capacitor-community/electron ----- > works great
11. Go to folder electron > src > setup.ts
12. add option fullscreen: true in [this.MainWindow = new BrowserWindow({] below code http://prntscr.com/v2SQNTPSPmBe
13. npx cap open @capacitor-community/electron ----- > Removed windows fame and close/minimize/maximize buttons
14. now remove the option added on point no 12 means undo the change or removed fullscreen: true from BrowserWindow options
15. npx cap open @capacitor-community/electron ----- > Removed windows fame and close/minimize/maximize buttons --> same as point no 13

**Expected behavior**
pont 15 should run the app with the frame and close/minimize/maximize buttons
same as point no 10.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS] Windows 10
- Browser [e.g. chrome, safari] Chrome
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
It works with changing the height and width options but once fullscreen is set to ture , cannot be undone

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.