-
Notifications
You must be signed in to change notification settings - Fork 479
[bug] Cropped uMatrix popup in Chrome #423
Comments
You will have to open an issue with the Chromium project, the popup size & position is entirely under the control of the browser -- it is supposed to adjust automatically to the embedded HTML. |
https://code.google.com/p/chromium/issues/detail?id=457887:
|
From my experience the Chromium dev team tends to take many years to fix issues, if at all. Would it be an option to give the popup a larger size by default and when actually filling it, scale down if needed. That way the worst thing that could happen is that the popup is larger than needed on OS X. Perhaps a min-width or something in the |
It should be noted that uMatrix is the only extension that exhibits this behaviour. I have about 10-15 extensions with popups and I've never had these problems before. So it must be related to how the popup content is formed. |
For the time being I'll just run my own version of uMatrix with a fixed height/width. I'm not sure if there's a good workaround available, setting the min-height/max-height and/or min-width/max-width has no effect but setting the height and width to a fixed value works just fine for me. Obviously... some people have smaller screens so it's not a universal solution. |
The size of the matrix depends on how much stuff is reported in it. Most other extensions are static in size. But as per bug description over at the chromium project, it is a problem which affects any extension with variable size. |
It's most likely a timing issue. I think it measures the size from the content at a certain point in time and because the data is added later it might not always work correctly. That would also explain why it works sometimes and is broken at other times, the big question is how we can force a resize/redraw without breaking other stuff. I'll test a bit |
Ok, I may have found a fix (at least, it appears to be working correctly so far). By adding a clearing div at the bottom of the popup.html file it appears to be working. So somewhere below the content just add this:
I'll keep testing and create a pull request if it's a permanent fix. |
This will have to be tested on Firefox, Palemoon, Seamonkey, Chromium, Opera as well to be sure there is no bad side-effect. |
I've tested both Chrome and Firefox and see no adverse effects but I'm not a 100% sure about the rest. Having that said, clear divs are a common solution for design problems in websites so I think it's quite a low risk change. Worst case I can think of if some browsers perhaps ignore the height setting and add blank space at the bottom of the popup. |
Fixed chrome os x issue with too small popup size (fixes #423)
Yes, it appears to have worked for a little while but chrome broke it again. The last few chrome versions actually gave me weird rendering bugs all over the place so I'm simply not using it much anymore. |
using chrome Version 56.0.2924.87 (64-bit) on OSX Sierra. umatrix 0.9.9b4 + ublock origin 1.11.0, bug still exists. window is cropped most of the time |
Bug still there on Chrome Version 58.0.3029.81 (64-bit) @ macOS Sierra 10.12.4, using uMatrix v1.0.0. Very, very annoying (even if it ultimately isn't uMatrix's fault). My boss is pressuring me to remove it because it takes a lot of time to set anything. |
In case this is helpful for anyone, this is a nasty dirty hacky workaround I'm using in another extension which seems to help: setTimeout(function() {
// Resize the window a tiny bit which forces a subtle rerender that
// fixes a bug where the popup is rendered in the wrong size initially
// sometimes.
document.body.style.height = window.innerHeight + 1 + "px";
setTimeout(function() {
// We can't remove the property too soon or otherwise it might happen
// before the popup render glitch. We'd rather not keep it either
// because the size of our widget can change after some UI flows.
document.body.style.removeProperty("height");
}, 100);
}, 200); |
Fixed chrome os x issue with too small popup size (fixes gorhill#423)
Disclaimer: I've only recently started using uMatrix so I'm not sure if this problem existed before.
At times my uMatrix popup is too small to be usable, opening it again solves the issue but it's annoying in the mean time. It happens at a regular basis (couple of times a day) without any discernible pattern.
Versions:
uMatrix: 0.9.3.1
Chrome: 45.0.2454.93 (64-bit)
os: os x yosemite (10.10)
The text was updated successfully, but these errors were encountered: