summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2021-07-28 18:45:29 +0200
committerGitHub <noreply@github.com>2021-07-28 18:45:29 +0200
commita636c3845403b5a765913977b140f0706049498c (patch)
tree8aab37ae1b02c21f0dc130a59a06e73deefc9cda /apps
parent58d034461b821e36e121702bef89cf725c359fc4 (diff)
parentc4fcf4c0b25bafde07677224724cb9163ba5e251 (diff)
downloadnextcloud-server-a636c3845403b5a765913977b140f0706049498c.tar.gz
nextcloud-server-a636c3845403b5a765913977b140f0706049498c.zip
Merge pull request #27920 from nextcloud/fix/21263/breadcrumb-wrong-float-width-comparison
Fix Files breadcrumbs being hidden even if there is enough space
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/breadcrumb.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js
index 89d42cc4e3e..f0a4da2d6d9 100644
--- a/apps/files/js/breadcrumb.js
+++ b/apps/files/js/breadcrumb.js
@@ -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