Skip to content
Permalink
Browse files

[ticket/13726] Fix function that calculates responsive breadcrumbs width

Do not calculate width of hidden elements.
Set minimum width to make sure breadcrumbs are always shown.

PHPBB3-13726
  • Loading branch information...
cyberalien committed Mar 28, 2015
1 parent 499088b commit 90b82d1a5f80b59edbe7335706f196e3d7feaf0e
Showing with 10 additions and 3 deletions.
  1. +10 −3 phpBB/styles/prosilver/template/forum_fn.js
@@ -376,12 +376,19 @@ function parseDocument($container) {

function resize() {
var width = 0,
diff = $left.outerWidth(true) - $left.width();
diff = $left.outerWidth(true) - $left.width(),
minWidth = Math.max($this.width() / 3, 240),
maxWidth;

$right.each(function() {
width += $(this).outerWidth(true);
var $this = $(this);
if ($this.is(':visible')) {
width += $this.outerWidth(true);
}
});
$left.css('max-width', Math.floor($this.width() - width - diff) + 'px');

maxWidth = $this.width() - width - diff;
$left.css('max-width', Math.floor(Math.max(maxWidth, minWidth)) + 'px');
}

resize();

0 comments on commit 90b82d1

Please sign in to comment.
You can’t perform that action at this time.