summaryrefslogtreecommitdiffstats
path: root/apps/files/js/breadcrumb.js
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-02-28 14:13:38 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-02-28 15:03:26 +0100
commitd122d054d368f8b7084f3ff31c406867b6c0a55c (patch)
treeb67daceb778f1f383f608a0ef56cf643b6b064d6 /apps/files/js/breadcrumb.js
parent10e9eeec45773325a69c47c19266d6629e4ea3ca (diff)
downloadnextcloud-server-d122d054d368f8b7084f3ff31c406867b6c0a55c.tar.gz
nextcloud-server-d122d054d368f8b7084f3ff31c406867b6c0a55c.zip
Do not show the crumbs again after hiding them
After the changes in the previous commit "_showCrumb" no longer shows the menu, only the same crumb that was hidden by the last call to "_hideCrumb". Therefore, if the crumb was hidden because it did not fit there is no need to try to show it again, as it will still not fit. Moreover, the calculated width for a hidden element is not always accurate; in some cases the calculated width is lower than the actual width (it happens, for example, when using a background image like the "Share" icon), which causea the crumb to be shown even if there is not enough room, which in the end causes the siblings to overflow the contents. No unit tests for this one, though; you will have to trust me on this, sorry ;-) Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files/js/breadcrumb.js')
-rw-r--r--apps/files/js/breadcrumb.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js
index 3e43de39354..b9e8e6920e9 100644
--- a/apps/files/js/breadcrumb.js
+++ b/apps/files/js/breadcrumb.js
@@ -356,12 +356,6 @@
this.$el.find('.crumbmenu').removeClass('hidden');
this._hideCrumb();
}
- // If container is bigger than content + element to be shown
- // AND if there is at least one hidden crumb
- while (this.$el.find(this.hiddenCrumbSelector).length > 0
- && this.getTotalWidth() + this._getCrumbElement().outerWidth(true) < availableWidth) {
- this._showCrumb();
- }
this._updateMenu();
}