Comment embeds: fix reflow flicker in firefox

Firefox was returning a height of 0 when an iframe was hidden.
This was causing unnecessary reflows when toggling between the
options for comment embeds. There doesn't seem to be a good
reason to broadcast a 0 height up to the parent window, so
i've added a guard for that.
This commit is contained in:
David Wick
2015-02-03 13:26:27 -08:00
parent 400abd9435
commit 82090d9ce9

View File

@@ -7,7 +7,7 @@
function checkHeight() {
var height = document.body.clientHeight;
if (App.height !== height) {
if (height && App.height !== height) {
App.height = height;
App.postMessage(window.parent, 'resize', height, '*');