Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1795)

Unified Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 14865017: Fix wrapping window decoration buttons in the Files.app's new UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_();

Powered by Google App Engine
This is Rietveld 408576698