Index: chrome/browser/resources/file_manager/js/file_manager.js |
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js |
index 7a95526baa657d6c579b48ace214b6a70a5ec264..9ff25511185e26d54c4531f1ddc88a555f5705ae 100644 |
--- a/chrome/browser/resources/file_manager/js/file_manager.js |
+++ b/chrome/browser/resources/file_manager/js/file_manager.js |
@@ -856,6 +856,8 @@ DialogType.isModal = function(type) { |
this.filePopup_ = null; |
+ this.searchBoxWrapper_ = |
+ this.dialogDom_.querySelector('.search-box-wrapper'); |
this.searchBox_ = this.dialogDom_.querySelector('#search-box'); |
this.searchBox_.addEventListener( |
'input', this.onSearchBoxUpdate_.bind(this)); |
@@ -1426,6 +1428,10 @@ DialogType.isModal = function(type) { |
if (!util.platform.newUI()) |
this.breadcrumbs_.truncate(); |
+ // Hide the search box if there is not enough space. |
+ if (util.platform.newUI()) |
+ this.searchBox_.hidden = this.searchBoxWrapper_.clientWidth < 100; |
+ |
this.searchBreadcrumbs_.truncate(); |
this.updateWindowState_(); |