Skip to content

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

Closed

Description

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

Activity

  1. added a commit that references this issue on Jan 30, 2016
  2. samwillis commented on Apr 16, 2016

    @samwillis

    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.

  3. ggamel commented on Apr 17, 2016

    @ggamel
    Contributor

    👍 I hope this makes it into Electron core

  4. loretoparisi commented on Jul 4, 2016

    @loretoparisi

    I'm having this issue on MacOS El Capitan and [email protected]. 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

  5. JonasRothmann commented on Sep 30, 2016

    @JonasRothmann

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

  6. aguynamedben commented on Jun 28, 2017

    @aguynamedben

    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.

  7. aguynamedben commented on Jun 28, 2017

    @aguynamedben

    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.

  8. DrifterAtSea commented on Nov 22, 2017

    @DrifterAtSea

    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

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