Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

When maximized, hitboxes seem off for buttons and address bar #7641

Closed
acvanzant opened this issue Mar 9, 2017 · 15 comments · Fixed by brave/muon#191
Closed

When maximized, hitboxes seem off for buttons and address bar #7641

acvanzant opened this issue Mar 9, 2017 · 15 comments · Fixed by brave/muon#191

Comments

@acvanzant
Copy link

acvanzant commented Mar 9, 2017

Test plan

  1. Launch Brave on Windows with DPI set to 100%
  2. Maximize the window
  3. Navigate around, so that you have a history
  4. Click the back button. Does the hitbox feel correct?
  5. Click forward button. Does the hitbox feel correct?
  6. Click inside the URL bar. Is the hitbox for click correct?
  7. Repeat 1-6 for 125% DPI
  8. Repeat 1-6 for 200% DPI

Original issue description

covering both:

  • Back/Forward Buttons clickable area does not extend to the edges of the button.
  • Unable to focus on address bar properly

  • Did you search for similar issues before submitting this one?
    Yes

  • Describe the issue you encountered:
    Clicking the back or forward buttons didn't seem to work consistently. I discovered that clicking near the edge was not working. I had to click in the very center of the button. It seems that the clickable area of the button is not the whole button.

  • Platform (Win7, 8, 10? macOS? Linux distro?):
    Win7 64

  • Brave Version (revision SHA):
    1db81cb

  • Steps to reproduce:

    1. Browse to two pages.
    2. Attempt to go back by clicking the back button but click as close to the edge of the button as possible.
    3. Notice nothing happens.
    4. Click in the center of the button to confirm the button is working.
  • Actual result:
    Clicking the button works if you click nearer to the center.

  • Expected result:
    The button should work if you click it anywhere in the graphical button.

  • Will the steps above reproduce in a fresh profile? If not what other info can be added?
    I believe so. I've just installed Brave.

  • Is this an issue in the currently released version?
    Yes

  • Can this issue be consistently reproduced?
    Yes

#5679

@acvanzant
Copy link
Author

It seems the refresh button also does this.

@SethClydesdale
Copy link

SethClydesdale commented Mar 10, 2017

I have the same issue, it appears to occur on every button ( back, forward, refresh, home, shields.. ), save for the window options ( min, max, close.. ). I created an image that shows the clickable area on the forward button. Note that this clickable area seems to vary for each button, perhaps based on the icon ? Although, clicking near the very bottom of all the buttons doesn't work, that's one thing they all have in common.

red : non-clickable
green : clickable

You can tell if you're within the clickable area, because the tooltip pops up, if the tooltip doesn't pop up, then you're not within that area. I can't tell you how many times I've clicked these buttons, only to realize there was no response, because I didn't click the right area.

OH one more thing : If you double click or hold down and drag your mouse within the non-clickable area, you can resize and drag the window. I suppose because you're clicking the title bar area and not the button.

Extra note : I'm running Win10, same rev of Brave

@SethClydesdale
Copy link

I just noticed that it might be related to the window state. When I have Brave maximized this occurs, but if I leave Brave windowed I can click the buttons without the aforementioned problem.

@luixxiul
Copy link
Contributor

luixxiul commented Mar 13, 2017

I can reproduce the issue with the window maximized. @bsclifton would you please check it out? as it seems to me to be related with the title bar

@luixxiul
Copy link
Contributor

@jonathansampson reported that not all of the URL bar area is clickable. I think these issues are related.

Mouse needs to be nearly 50% up the URL bar in order to click-select the contents.

@SethClydesdale
Copy link

@luixxiul It's definitely related to this issue, because I've also had trouble clicking the address bar while Brave is maximized. I forgot to mention that in my last reply, but it's good someone else caught it.

@SethClydesdale
Copy link

I just noticed that the little lock for HTTPS is nigh impossible to click while the window is maximized. I'm assuming this is related to the current issue, so I thought I'd mention it.

@bsclifton bsclifton added needs-owner ♞ This issue is tagged for an upcoming release but has no owner. bug/dpi/monitor and removed needs-owner ♞ This issue is tagged for an upcoming release but has no owner. bug misc/button misc/fullscreen-option labels Apr 7, 2017
@bsclifton bsclifton self-assigned this Apr 11, 2017
@bsclifton
Copy link
Member

+1 from users @chubbyninja and @hexigen via #8176

@bsclifton bsclifton changed the title Back/Forward Buttons clickable area does not extend to the edges of the button. When maximized, hitboxes seem off for buttons and address bar Apr 11, 2017
@bsclifton
Copy link
Member

My hunch is that this problem is in the Electron/Muon code. The client rect is likely wrong because of border calculations. The fixes I have in mind should also fix #5159

My first step would be to pull in electron/electron#9140 from upstream electron into Muon

@bsclifton
Copy link
Member

bsclifton commented Apr 11, 2017

possibly related: #7215

+1 from dupe #7770

@ghost
Copy link

ghost commented Apr 11, 2017

@bsclifton according to http://dpi.lv/ it's 170 DPI scaling would be 100% as i have not altered anything like that, hope this is helpful and goodluck!

@bsclifton
Copy link
Member

+1 from earlier report by @Zuzu-Typ #6445

@alexwykoff alexwykoff added this to the 1.0.0 milestone Apr 18, 2017
@TheJare
Copy link

TheJare commented May 1, 2017

FYI I have noticed the wrong non-clickable areas behave like the title frame, i.e. a double click on what should have been a UI element (like the url bar) instead restores the window to non-maximized state.

The same happens with the timing information (little blue text) embedded inside the right side of the address bar, but this may be intended (wrong choice IMHO) and unrelated to this bug since it happens in both maximized and restored window states.

This drives me crazy. :)

bsclifton added a commit to brave/muon that referenced this issue May 5, 2017
- manually applied: electron/electron@638eae1
- manually applied: https://github.com/electron/electron/pull/9167/files

Passes the correct subsystem variable to linker. Before, older Windows version
was being used which affected GetSystemMetrics (wrong values returned)

Should fix brave/browser-laptop#7641
Should fix brave/browser-laptop#7215
Might fix brave/browser-laptop#5159

Auditors: @bbondy, @bridiver
bsclifton added a commit to brave/muon that referenced this issue May 5, 2017
- manually applied: electron/electron@638eae1
- manually applied: https://github.com/electron/electron/pull/9167/files

Passes the correct subsystem variable to linker. Before, older Windows version
was being used which affected GetSystemMetrics (wrong values returned)

Should fix brave/browser-laptop#7641
Should fix brave/browser-laptop#7215
Might fix brave/browser-laptop#5159

Auditors: @bbondy, @bridiver
@bsclifton bsclifton modified the milestones: 0.15.3, 1.0.0 May 5, 2017
@bsclifton
Copy link
Member

Also happens with tab sets: #8292

@Jacalz
Copy link
Contributor

Jacalz commented May 9, 2017

Comfirmed fixed in latest master 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.