Skip to content

Closing detach devtools disables browser window transparency/vibrancy #10420

@KagamiChan

Description

@KagamiChan
  • Electron version: 1.8.0 beta
  • Operating system: macOS 10.12.6

Expected behavior

Browser window's vibrancy settings persists after closing detached devtools

Actual behavior

Closing detached devtools will disable browser window's vibrancy, and calling setVibrancy again can't re-enable it.

sep-01-2017 14-04-05

How to reproduce

The repo for reproducing is https://github.com/KagamiChan/electron-quick-start in branch 1.8.0-vibrancy-mac. I simply added these lines in renderer.js

const { remote } = require('electron')

const win = remote.getCurrentWindow()
win.setVibrancy('ultra-dark')

win.webContents.openDevTools({mode: 'detach'})

win.webContents.on('devtools-closed', () => {
  setTimeout(() => {
    console.log('restoring vibrancy')
    win.setVibrancy('ultra-dark')
  }, 1000)
})

Steps to reproduce:

  1. git clone -b 1.8.0-vibrancy-mac https://github.com/KagamiChan/electron-quick-start
  2. cd electron-quick-start && npm i && npm run start
  3. Close the detached devtools
  4. the browser window loses vibrancy

btw, In previous version (1.7.5), non-detached devtools breaks the vibrancy but then it will restore after closing the devtools, and in 1.8.0 the vibrancy does not come back either.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions