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

browserView.setBounds causes issues with focus and clicks if position is not x=0, y=0 #26681

Closed
3 tasks done
mchataigner opened this issue Nov 24, 2020 · 9 comments
Closed
3 tasks done

Comments

@mchataigner
Copy link

mchataigner commented Nov 24, 2020

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 9.x, 10.x, 11.x
  • Operating System:
    • macOS 11.0.1 (was on macOS 10.15.7 with same issue before BigSur upgrade) (no issue on GNU/Linux, and not tested on Windows)
  • Last Known Working Electron version:
    • N/A

Expected Behavior

When a BrowserView is set to a position other than x=0, y=0, the whole viewable view should be focusable/clickable.

Actual Behavior

When I set a BrowserView with bounds { x=0, y=150, width=window.width, heigth=window.height-150}, there is a rectangle at the bottom of the window of 150 pixels high where I cannot click.

To Reproduce

I’ve create a small project to reproduce https://github.com/mchataigner/electronsample

$ git clone https://github.com/mchataigner/electronsample.git -b main
$ npm install
$ npm start

Screenshots

Screenshot 2020-11-24 at 22 27 05

Screenshot 2020-11-24 at 22 27 13

Additional Information

@praneetrohida
Copy link

Did not have this issue on v10.1.5. It started happening after I upgraded to v11.0.3.

@sirtimid
Copy link

sirtimid commented Dec 4, 2020

@codebytere This issue was caused by this PR #26322 It has to do with draggable regions, they are not calculated properly. There is a region at the end of the BrowserView that is the height of the top offset and it is draggable.

Probably you should use BrowserWindow.height not BrowserView.height to exclude the draggable region?

@andycreeth
Copy link

We are also experiencing this issue with stream-labs/streamlabs-obs. We use a BrowserView positioned on the right side of the window. On version 9.3.4, the entire BrowserView is being treated as a drag region, and is not interactable. We are downgrading to 9.3.3 on macOS for now, which resolves the issue.

The top post in this issue seems pretty complete, but happy to provide any additional details.

@sirtimid
Copy link

@codebytere So I see this was fixed for mac on #26690 and for windows on #26738 Can you backport the fixes on 9.x.x please?

@codebytere
Copy link
Member

hey @sirtimid 9.x.x is mostly security now but i can try :)

@sirtimid
Copy link

hey @sirtimid 9.x.x is mostly security now but i can try :)

thank you!! :)

@praneetrohida
Copy link

Is there any update on this issue? This has been blocking us from upgrading to 11

@codebytere
Copy link
Member

@praneetrohida oops thanks for the ping! i already fixed this actually, in #27147 - latest 11 should contain it :)

@sirtimid
Copy link

@codebytere but it wasn't backported on 9.x.x :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants