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

Top of window with "hiddenInset" title bar becomes unresponsive after exiting fullscreen #16418

Closed
javan opened this issue Jan 16, 2019 · 9 comments

Comments

@javan
Copy link
Contributor

javan commented Jan 16, 2019

  • Output of node_modules/.bin/electron --version: v4.0.1
  • Operating System (Platform and Version): macOS 10.14.2

Expected Behavior
The top of the window should continue responding to clicks after exiting from fullscreen.

Actual behavior
The top ~40px stops responding to clicks after exiting from fullscreen.

To Reproduce

  1. Clone and run https://github.com/javan/electron-quick-start/tree/hidden-inset-mojave
  2. Click the black bar at the top of the window. It should turn purple while the mouse is down.
  3. Enter and exit fullscreen.
  4. Click the top of the window and note that it no longer turns purple.
$ git clone https://github.com/javan/electron-quick-start.git -b hidden-inset-mojave
$ npm install
$ npm start

Screenshots
electron-fullscreen-clicks

Additional Information
This issue is quite similar to #14529.

@olafuria
Copy link

We are also seeing this in Tidal update we are working on.

@littlecold233
Copy link

I have the same problem!!!

How Could I fix that?It's really strange

@littlecold233
Copy link

@javan set the titleBarStyle hidden fix the issue

I just test hidden and hiddenInset for my BrowserWindow and I find hidden works much better then hiddenInset

@nathanlesage
Copy link

I second that. Using hidden and having the buttons placed very close to the edge of the frame would require me to overthink my whole toolbar design in Zettlr, which I'd like to avoid. Besides, Chrome, e.g. also uses the hiddenInset way of displaying the traffic lights, but still does not expose the strange unresponsiveness after exiting fullscreen.

Besides, what I noted is that in fullscreen the window uses an extra-high titlebar, which is normally indicative of websites that go in a "fake fullscreen" mode (I'll just call it that, because something different happens there, but I don't know what). Chrome for some time had used this "thick frame" mode as well. Maybe electron is using the same "fake" fullscreen (that is not used anymore in Chrome) as well and that's causing the problems?

To show what I mean: if you put an app into fullscreen mode, e.g. Chrome, or Safari, and go to the very top with your mouse, you'll see a standard-height titlebar:

image

But compare this to an electron app using hiddenInset:

image

The titlebar is twice the size, so it seems to be something that happens with the native Window controller on macOS. I'm not a Swift/Apple native programmer so I wouldn't know where to look, but maybe have a look there?

What I also tested and can confirm it does not work:

  • Show the window title in fullscreen
  • Force-reload the CSS-Stylesheets with the draggable-region directives in them

@nathanlesage
Copy link

Some updates. I did some digging into what might be the cause.

  1. To achieve the inset traffic lights, Electron uses a Toolbar with no buttons, makes it transparent and click-through.
  2. After exiting the fullscreen precisely the area of the toolbar becomes unclickable. Still, it is strange that the hovering still works.
  3. Can confirm that Electron 3.1.2 on macOS Mojave 10.14.2 works and buttons stay responsive. I still haven't been able to pinpoint what has changed from 3.1.2 to 4.0.2 what might cause this issue.

@issacgerges
Copy link

From some testing with fiddle, this appears to have started in 4.0.0-beta.1 and stops appearing in 5.0.0-beta.1.

@codebytere
Copy link
Member

codebytere commented Mar 21, 2019

I'm fairly certain that this was fixed via Chromium upgrade in 5, so i'd proceed with that information in mind. As such, it's unlikely that it'll be backported to 4.

@knopp
Copy link

knopp commented Jun 8, 2019

VSCode just picked up Electron 4 for insider builds. Any chance of backporting this?

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