diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2021-07-28 18:45:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-28 18:45:29 +0200 |
commit | a636c3845403b5a765913977b140f0706049498c (patch) | |
tree | 8aab37ae1b02c21f0dc130a59a06e73deefc9cda /apps | |
parent | 58d034461b821e36e121702bef89cf725c359fc4 (diff) | |
parent | c4fcf4c0b25bafde07677224724cb9163ba5e251 (diff) | |
download | nextcloud-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.js | 4 |
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 |