From f41947f726c1081144ba2db994ddac8d1c4860ba Mon Sep 17 00:00:00 2001 From: PayBas Date: Sat, 7 Jun 2014 18:23:32 +0200 Subject: [PATCH] [ticket/12662] Fix rounding problems when detecting relative height Firefox and IE round subpixels up, while webkit rounds down. So we have to account for that. PHPBB3-12662 --- phpBB/styles/prosilver/template/forum_fn.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 3553165e90..ccd7943045 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -543,7 +543,7 @@ function parse_document(container) } // Nothing to resize if block's height is not bigger than tallest element's height - if ($this.height() <= maxHeight) { + if ($this.height() <= (maxHeight + 1)) { return; } @@ -557,7 +557,7 @@ function parse_document(container) compactMaxHeight = Math.max(compactMaxHeight, $(this).outerHeight(true)); }); - if ($this.height() <= maxHeight) { + if ($this.height() <= (maxHeight + 1)) { return; } @@ -595,7 +595,7 @@ function parse_document(container) item.css('display', ''); $this.addClass('responsive'); - // Try to not hide filtered items #TODO: this does not work in FF and IE of some reason + // Try to not hide filtered items if (filterLastList.length) { links.not(filterLast).css('display', 'none'); @@ -605,7 +605,7 @@ function parse_document(container) maxHeight = Math.max(maxHeight, $(this).outerHeight(true)); }); - if ($this.height() <= maxHeight) { + if ($this.height() <= (maxHeight + 1)) { menu.children().filter(filterLast).css('display', 'none'); return; }