Skip to content

[Feature Request]: Allow for opening docked DevTools, even if WCO is enabled #35715

Closed

Description

@whzard

Preflight Checklist

Problem Description

#35209 has introduced a change that forces a 'detach' state for DevTools, if they are opened on a WC in a window with the Window Controls Overlay enabled.

However, this is not always a desired behavior, especially if DevTools are an integral part of your application.

I must emphasize, the detached state is not a default, but forced, which means you cannot override this even with

webContents.openDevTools({ mode: 'bottom' })
// ignores the mode

Proposed Solution

While the 'detach' by default is good for solving the problem of WCO covering the devtools, there should be an option to override this.

For example, wc.openDevTools() will open them in the detached state, but wc.openDevTools({ mode: 'bottom' }) should respect the mode property.

Perhaps, this should work just like it works with the <webview> tags, when if you explicitly pass an empty mode, it will open the DevTools in the last docked state.

Alternatives Considered

None. Disabling WCO isn't a good enough option.

Additional Information

No response

Activity

  1. self-assigned this
    on Sep 21, 2022
  2. codebytere commented on Sep 21, 2022

    @codebytere
    Member

    @wheezard you make a good point - opened a PR to enable your use case :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions