summaryrefslogtreecommitdiffstats
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-03-01 20:33:14 +0100
commit23559b2eda31d1ec720352e999779b9883c8de13 (patch)
tree91c33a9b49ec1a34cc7c7b4f93f276f3a4e74f5c
parenta1af18fa3581ee48b0381a626b1227dda4c63025 (diff)
downloadnextcloud-server-23559b2eda31d1ec720352e999779b9883c8de13.tar.gz
nextcloud-server-23559b2eda31d1ec720352e999779b9883c8de13.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>
-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();
}