Merge pull request #28224 from nextcloud/backport/27920/stable20

[stable20] Fix Files breadcrumbs being hidden even if there is enough space
This commit is contained in:
MichaIng 2021-07-28 21:09:12 +02:00 committed by GitHub
commit c26814740c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -327,7 +327,7 @@
// Note that the crumbs shown always overflow the parent width
// (except, of course, when they all fit in).
while (this.$el.find(this.hiddenCrumbSelector).length > 0
&& this.getTotalWidth() <= this.$el.parent().width()) {
&& Math.round(this.getTotalWidth()) <= Math.round(this.$el.parent().width())) {
this._showCrumb();
}
@ -343,7 +343,7 @@
// If container is smaller than content
// AND if there are crumbs left to hide
while (this.getTotalWidth() > availableWidth
while (Math.round(this.getTotalWidth()) > Math.round(availableWidth)
&& this.$el.find(this.crumbSelector).length > 0) {
// As soon as one of the crumbs is hidden the menu will be
// shown. This is needed for proper results in further width