Skip to content

Commit 918c75c

Browse files
authored
Merge pull request #28222 from nextcloud/backport/27920/stable22
[stable22] Fix Files breadcrumbs being hidden even if there is enough space
2 parents 2585ae8 + bd1217f commit 918c75c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/files/js/breadcrumb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
// Note that the crumbs shown always overflow the parent width
328328
// (except, of course, when they all fit in).
329329
while (this.$el.find(this.hiddenCrumbSelector).length > 0
330-
&& this.getTotalWidth() <= this.$el.parent().width()) {
330+
&& Math.round(this.getTotalWidth()) <= Math.round(this.$el.parent().width())) {
331331
this._showCrumb();
332332
}
333333

@@ -343,7 +343,7 @@
343343

344344
// If container is smaller than content
345345
// AND if there are crumbs left to hide
346-
while (this.getTotalWidth() > availableWidth
346+
while (Math.round(this.getTotalWidth()) > Math.round(availableWidth)
347347
&& this.$el.find(this.crumbSelector).length > 0) {
348348
// As soon as one of the crumbs is hidden the menu will be
349349
// shown. This is needed for proper results in further width

0 commit comments

Comments
 (0)