server: fix read-only + fullscreen option combo

This commit is contained in:
jean-emmanuel 2024-08-10 10:07:56 +02:00
parent 8878c9283b
commit f2b2dbe9f6
3 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 1.27.1
- bug fixes
- server: `fullscreen` option not working when `read-only` is set
## 1.27.0
- bug fixes

View file

@ -38,5 +38,6 @@ if (screenfull.isEnabled && !iOS) {
}
window.ELECTRON_FULLSCREEN = ()=>{fullscreen.toggle()}
module.exports = fullscreen

View file

@ -79,7 +79,7 @@ module.exports = function(options={}) {
window.webContents.once('page-title-updated', ()=>{
if (options.fullscreen) {
window.webContents.sendInputEvent({keyCode: 'F11', type: 'keyDown'})
window.webContents.executeJavaScript('window.ELECTRON_FULLSCREEN()', true)
}
if (app._noGpu) {
window.webContents.executeJavaScript(`