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

BrowserWindow 'title-bar-style': 'hidden-inset' option: drag & drop #3009

Closed
ghost opened this issue Oct 6, 2015 · 8 comments
Closed

BrowserWindow 'title-bar-style': 'hidden-inset' option: drag & drop #3009

ghost opened this issue Oct 6, 2015 · 8 comments

Comments

@ghost
Copy link

ghost commented Oct 6, 2015

If this option is set, you can't drag/drop elements that are located in the top of the window (in the region where window's toolbar is placed). Even with -webkit-app-region: drag, dragging is not performed correctly.

The element which being dragged is native input[type="range"]
Here is the preview:
Preview

@samwillis
Copy link

It looks to me like the Brave guys have fixed it in their fork of Electron brave/muon#13 and it just needs merging upstream.

I would love to see this in electron.

@ggamel
Copy link
Contributor

ggamel commented Apr 17, 2016

👍 I hope this makes it into Electron core

@loretoparisi
Copy link

loretoparisi commented Jul 4, 2016

I'm having this issue on MacOS El Capitan and electron@1.2.5. Has been merged with that?
I have tried the frameless-window example here
and adding to the BrowserWindow the hidden-inset titlebar option:

mainWindow = new BrowserWindow({
    width: 360,
    height: 300,
    frame: false,
    transparent : true,
    titleBarStyle : 'hidden-inset'
  });

having
schermata 2016-07-04 alle 18 14 42

Only with the custom top title bar item active:

.top-titlebar {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 32px;
  background-color: #7a7c7c;
  -webkit-user-select: none;
  -webkit-app-region: drag;
}

I can the the -webkit-app-region: drag to work:

schermata 2016-07-04 alle 18 16 10

@JonasRothmann
Copy link

This is still an issue. Anybody with solutions to this issue? Seems like it breaks a lot of software on OSX

@aguynamedben
Copy link

aguynamedben commented Jun 28, 2017

This is still an issue in Electron 1.6.7. I don't see why this issue was closed.

Steps to reproduce:

  1. Create a BowerWindow with these settings:
    mainWindowSettings = {
      show: false,
      width: 800,
      height: 500,
      frame: false,
    };
    mainWindow = new BrowserWindow(mainWindowSettings);
  1. Put a link in the location the title bar would be:

hello_electron_react__and_browserwindow__title-bar-style____hidden-inset__option__drag___drop_ _issue__3009_ _electron_electron

3. Observe that you can click the link, but there is no cursor, even when you've defined a cursor in your CSS. 4. Remove the `frame: false` line from the settings and relaunch the app. Observe that you can click the link and there is a cursor as expected.

Other notes

My guess is that under the hood BrowserWindow's {frame: false} functionality is implemented using transparent windows so the area where the title bar normally would be is subject to #1335.

@aguynamedben
Copy link

aguynamedben commented Jun 28, 2017

Sorry if it's unclear... the exact issue I'm seeing is the same as this: #3619 (Cursor doesn't change to pointer in topbar) which was closed and linked to this issue.

@MarshallOfSound
Copy link
Member

@aguynamedben You're looking for this https://github.com/electron/electron/blob/master/docs/api/frameless-window.md#custombuttonsonhover 😄

@JohannRosenberg
Copy link

I'm using electron 1.6.11 and the cursor doesn't change to a pointer using css. Was this fixed?

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

8 participants