Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable21] Fix Files breadcrumbs being hidden even if there is enough space #28223

Merged
merged 1 commit into from
Jul 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/files/js/breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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
Expand Down