uMatrix icon indicating copy to clipboard operation
uMatrix copied to clipboard

uMatrix controls cut off

Open beefstew opened this issue 9 years ago • 26 comments

In Google Chrome on Mac OS X (version 55.0.2883.95 (Official Build) (64-bit)), the top controls of uMatrix are often cut off when I click the extension icon.

http://imgur.com/a/IKWXG

I can't figure out what causes it, so no steps to reproduce. But this small rendering occurs quite frequently.

The list of sites scrolls in the displayed area with the mouse wheel and you can enable domains as usual (for the sites that are visible). However, the padlock and reload buttons are inaccessible.

Usually, if you keep clicking the extension icon (6-20 times), something will sort out the layout problem and display correctly. None of resizing the window, showing other extensions, or switching tabs seems to cause the correct rendering.

http://imgur.com/a/lyD5o

beefstew avatar Jan 10 '17 05:01 beefstew

I also seem to have the same problem.

Specs:

  • Resolution of 3840x2160 - scaled to 2560x1440
  • MacOS Sierra 10.12.1
  • Chrome 55.0.2883.95

Even though, the issue has been already posted, I doubt that this is supposed to be an chromium issue.

Related post: https://github.com/gorhill/uMatrix/issues/114#issuecomment-83701082

On my Macbook Air 13" with a 100% scaling, I haven't seen this issue at all so my guess is that only scaled displays (retina displays) are affected.

berlinjunker avatar Jan 17 '17 21:01 berlinjunker

This bug occurs for me on an early 2011 MacBook Pro 15" without Retina and resolution set to "Default for display", so I'm not sure it's scaling related.

beefstew avatar Jan 17 '17 21:01 beefstew

Are you sure, that you are using a non-retina display? Because your screenshots looks high-res to me. And resolutionwise, I would say that it is in fact a Hi-Res screenshot.

EDIT: I also think, that error only occurs on MacOS

berlinjunker avatar Jan 19 '17 00:01 berlinjunker

Confirm that this happens regardless of display resolution. Affects both my Pre-retina MacBook and TouchBar MBP, on the internal screen, external monitor, or HDTV.

snafuy avatar Jan 25 '17 21:01 snafuy

I use both a 2011 non-Retina MacBook Pro and a mid-2015 Retina MacBook Pro. It occurs in Chrome on both laptops – both on the built-in LCD and on external monitors (running in their native resolution).

beefstew avatar Jan 25 '17 21:01 beefstew

https://bugs.chromium.org/p/chromium/issues/detail?id=428044

gorhill avatar Jan 25 '17 23:01 gorhill

Same on Firefox 53b

umatrix

altunyurt avatar Mar 23 '17 08:03 altunyurt

Same on Firefox 53b

Is it occasional or always like this? (Can't reproduce on Nightly + 0.9.9b5).

gorhill avatar Mar 23 '17 12:03 gorhill

This is by far the most annoying bug. It happens on both my Macbook Pro and MacbookAir, on several uMatrix and Chrome versions (as back as 1 year at least and up to the latest version).

Again it's really hard to troubleshoot because it's random, but it happens on just about every website. And you have to click to expand it again say 10 - 20 times to get it to finally pop up properly. Do it again once or twice and the problem happens again.

I tried refreshing the page, or moving the content up/down a bit, but that doesn't really help. And I don't believe it is related to the content, because even simple sites like google.co.nz can have this issue.

As an example & quick test. Even on this page as I type, I tried expanding it and the popup was successful 3 times. The 4th time, the problem happened, and I took a screenshot.

I'm happy to help troubleshooting though if there's anything you need.

Ta.

screen shot 2017-03-25 at 3 41 24 pm

sgreadly avatar Mar 25 '17 02:03 sgreadly

It's been this way for ages IIRC and happens for my other extensions too. A link to the Chromium bug report has already been posted above: https://bugs.chromium.org/p/chromium/issues/detail?id=428044. I doubt anything can be done here.

zmwangx avatar Mar 25 '17 03:03 zmwangx

If ever there was a workaround possible, this is not something I am in a position to investigate. Someone with dev skills on MacOS will have to fiddle with HTML/CSS/JS to find out if something can be done to work around the issue.

gorhill avatar Mar 25 '17 12:03 gorhill

@gorhill while it was happening, it wasn't everytime. I'm running ff53b6 on linux mint right now and i don't remembr it occuring since i posted the previous comment, maybe the ff updates helped.

It now works on the same page in my prev. comment scrshot

altunyurt avatar Mar 30 '17 09:03 altunyurt

I have the same issue on my mac. Maybe you can add the workaround posted in the chromium bug report? Setting display: none; then display: block; on the body-element works for me when testing.

gson88 avatar Apr 08 '17 11:04 gson88

Best is if someone with dev skills try the workaround, I do not have a mac, I can't test whether that works. Also, this would have to be tested to find out if such workaround affects negatively uMatrix on other platforms.

edit: ok sorry read too fast, you did test it. Where in the js file did you put the display style toggle code?

gorhill avatar Apr 08 '17 12:04 gorhill

I only tested it by inspecting the elements and changing the css from the inspector. I'm trying to find where to put it, not very experienced in browser extensions.

gson88 avatar Apr 08 '17 12:04 gson88

Ok how about..

Add style="display: none;" in this div, result:

<div class="paneContent" style="display: none;">

Then add the following line:

document.querySelector('.paneContent').style.removeProperty('display');

At this point in the source code: https://github.com/gorhill/uMatrix/blob/master/src/js/popup.js#L1269

gorhill avatar Apr 08 '17 13:04 gorhill

It doesn't help unfortunately. No difference. Is there an event for when the animation is done?

gson88 avatar Apr 08 '17 14:04 gson88

The animation is from MacOS, it's completely outside of uMatrix, and probably the browser I suppose.

gorhill avatar Apr 08 '17 14:04 gorhill

The most consistent "fix" seems to be this:

setTimeout(function(){
	document.body.style.display = "none";

	setTimeout(function(){
	    document.body.style.display = "block";
	}, 5);
}, 300);

But it makes the whole popup flash a little bit after opening. Not a pretty fix. And I'm not sure how it looks on windows. Edit: Inside onMatrixSnapshotReady

gson88 avatar Apr 08 '17 15:04 gson88

One thing I am curious about is if the resize event is fired when the popup window size is animated: https://developer.mozilla.org/en-US/docs/Web/Events/resize. Is it something you can verify? Like just adding the code below is see what is reported at the console:

window.addEventListener('resize', function(ev) {
    console.log(window.innerHeight);
});

gorhill avatar Apr 08 '17 17:04 gorhill