aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2021-07-12 11:36:50 +0200
committerJulien Veyssier <eneiluj@posteo.net>2021-07-28 16:40:14 +0200
commitc4fcf4c0b25bafde07677224724cb9163ba5e251 (patch)
tree9555b38e02e055f10307ebb377f8eb9b9040494a /apps/files/js
parent3ced8406a0f244d4a46f1feb10531220bd4a86e7 (diff)
downloadnextcloud-server-c4fcf4c0b25bafde07677224724cb9163ba5e251.tar.gz
nextcloud-server-c4fcf4c0b25bafde07677224724cb9163ba5e251.zip
refs #21263 round numbers when checking if breadcrumbs should be hidden
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Diffstat (limited to 'apps/files/js')
-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