Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: titleBarOverlay prevent dragging the BrowserWindow #32966

Closed
3 tasks done
alefoll opened this issue Feb 18, 2022 · 8 comments
Closed
3 tasks done

[Bug]: titleBarOverlay prevent dragging the BrowserWindow #32966

alefoll opened this issue Feb 18, 2022 · 8 comments

Comments

@alefoll
Copy link

alefoll commented Feb 18, 2022

Preflight Checklist

Electron Version

17.0.1

What operating system are you using?

Windows

Operating System Version

Windows 11 21H2 (22000.527)

What arch are you using?

x64

Last Known Working Electron version

14.2.5

Expected Behavior

The BrowserWindow should be draggable with -webkit-app-region: drag.

Actual Behavior

Unable to move the BrowserWindow.

Testcase Gist URL

https://gist.github.com/alefoll/1cd3b68937dad2e73ec04a55df634540

Additional Information

No response

@SquitchYT
Copy link

I have the same problem. Did you find any workaround ?

@cawa-93
Copy link

cawa-93 commented Feb 23, 2022

I can confirm this issue on Windows 10 19044.1566 and on electron 17.1.0

@Modjular
Copy link

Modjular commented Feb 25, 2022

I'm getting this bug as well:

  • Electron: v17.1.0
  • OS: Windows 10 19043.1526

it works fine on macos, and worked for both back in v13.6.3 of Electron

I can confirm that it works fine when titleBarOverlay is commented out. Here's the full BrowserWindow config in case it's any help:

  // Create the browser window.
  const win = new BrowserWindow({
    width: 1050,
    height: process.platform === 'darwin' ? 700 : 750,
    minWidth: 1050,
    minHeight: process.platform === 'darwin' ? 700 : 750,
    backgroundColor: '#201F1F',
    show: false,
    titleBarStyle: 'hidden',
    titleBarOverlay: {
      color: '#0000',
      symbolColor: 'white',
      height: 40,
    },
    icon: path.join(__static, 'Icon-512x512.png'),
    webPreferences: {
      preload: path.join(__dirname, 'preload.js'),
      enableRemoteModule: true,
      contextIsolation: false,

      // Use pluginOptions.nodeIntegration, leave this alone
      // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
      nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
      devTools: config.isDevelopment,
    },
  })

@psycho-source
Copy link

psycho-source commented Feb 28, 2022

Same issue. Windows 11 Build 22563.1. electron 17.1.0.

Double click events are going through fine (Double click to maximize/restore window). Only dragging is affected.
i can also confirm, dragging works as intended without titleBarOverlay property.

@blakjak44
Copy link

Same issue here. ^

@gadfly3173
Copy link

gadfly3173 commented Mar 4, 2022

electron 15.4.0 16.0.10 17.1.0 18.0.0-alpha.5 all have this issue

@workeffortwaste
Copy link

Having the same problem with 17.1.0

@alefoll
Copy link
Author

alefoll commented Mar 10, 2022

It's fixed, thanks to #32871. You can test it in v18.0.0-beta.2.
Just wait for a new v16, v17 update that include:

Fixed drag regions on WCO windows on Windows. #33202 (Also in #33201)

@alefoll alefoll closed this as completed Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants