mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-09-30 09:06:56 +13:00
fix visual glitch in recent versions of Chromium
This commit is contained in:
parent
754e8213cf
commit
da8cc90ab4
1 changed files with 22 additions and 10 deletions
|
@ -1000,13 +1000,6 @@ var makeMenu = function() {
|
||||||
|
|
||||||
renderMatrixHeaderRow();
|
renderMatrixHeaderRow();
|
||||||
|
|
||||||
// Manually adjust the position of the main matrix according to the height
|
|
||||||
// of the toolbar/matrix header.
|
|
||||||
document.querySelector('.paneContent').style.setProperty(
|
|
||||||
'padding-top',
|
|
||||||
document.querySelector('.paneHead').clientHeight + 'px'
|
|
||||||
);
|
|
||||||
|
|
||||||
startMatrixUpdate();
|
startMatrixUpdate();
|
||||||
makeMatrixGroup0(groupStats[0]);
|
makeMatrixGroup0(groupStats[0]);
|
||||||
makeMatrixGroup1(groupStats[1]);
|
makeMatrixGroup1(groupStats[1]);
|
||||||
|
@ -1274,9 +1267,26 @@ var onMatrixSnapshotReady = function(response) {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
var resizePopup = function() {
|
var resizePopup = (function() {
|
||||||
document.body.setAttribute('data-resize-popup', 'true');
|
var timer;
|
||||||
};
|
var fix = function() {
|
||||||
|
timer = undefined;
|
||||||
|
var doc = document;
|
||||||
|
// Manually adjust the position of the main matrix according to the
|
||||||
|
// height of the toolbar/matrix header.
|
||||||
|
doc.querySelector('.paneContent').style.setProperty(
|
||||||
|
'padding-top',
|
||||||
|
(doc.querySelector('.paneHead').clientHeight + 2) + 'px'
|
||||||
|
);
|
||||||
|
doc.body.setAttribute('data-resize-popup', 'true');
|
||||||
|
};
|
||||||
|
return function() {
|
||||||
|
if ( timer !== undefined ) {
|
||||||
|
clearTimeout(timer);
|
||||||
|
}
|
||||||
|
timer = vAPI.setTimeout(fix, 97);
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
@ -1430,6 +1440,8 @@ uDom('#matList').on('click', '.g4Meta', function() {
|
||||||
resizePopup();
|
resizePopup();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
resizePopup();
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in a new issue