diff options
Diffstat (limited to 'apps/files/js/breadcrumb.js')
-rw-r--r-- | apps/files/js/breadcrumb.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js index 16762f386be..4a61188e93a 100644 --- a/apps/files/js/breadcrumb.js +++ b/apps/files/js/breadcrumb.js @@ -316,7 +316,15 @@ return; } - var availableWidth = this.$el.parent().width() - this.$el.parent().find('.actions.creatable').outerWidth(true); + var siblingsWidth = 0; + this.$el.prevAll(':visible').each(function () { + siblingsWidth += $(this).outerWidth(true); + }); + this.$el.nextAll(':visible').each(function () { + siblingsWidth += $(this).outerWidth(true); + }); + + var availableWidth = this.$el.parent().width() - siblingsWidth; // If container is smaller than content // AND if there are crumbs left to hide |