mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-05 18:49:39 +02:00
this fixes #730
This commit is contained in:
parent
36960f273b
commit
273dcd763f
@ -1321,15 +1321,19 @@ vAPI.toolbarButton.onBeforeCreated = function(doc) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTimer = setTimeout(resizePopup, 20);
|
updateTimer = setTimeout(resizePopup, 10);
|
||||||
};
|
};
|
||||||
var resizePopup = function() {
|
var resizePopup = function() {
|
||||||
|
updateTimer = null;
|
||||||
var body = iframe.contentDocument.body;
|
var body = iframe.contentDocument.body;
|
||||||
panel.parentNode.style.maxWidth = 'none';
|
panel.parentNode.style.maxWidth = 'none';
|
||||||
// Set the hegiht first, then the width for proper resising
|
// https://github.com/gorhill/uBlock/issues/730
|
||||||
panel.style.height = iframe.style.height = body.clientHeight + 'px';
|
// Voodoo programming: this recipe works
|
||||||
panel.style.width = iframe.style.width = body.clientWidth + 'px';
|
panel.style.height = iframe.style.height = body.clientHeight.toString() + 'px';
|
||||||
updateTimer = null;
|
panel.style.width = iframe.style.width = body.clientWidth.toString() + 'px';
|
||||||
|
if ( iframe.clientHeight !== body.clientHeight || iframe.clientWidth !== body.clientWidth ) {
|
||||||
|
delayedResize();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
var onPopupReady = function() {
|
var onPopupReady = function() {
|
||||||
var win = this.contentWindow;
|
var win = this.contentWindow;
|
||||||
|
Loading…
Reference in New Issue
Block a user