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

Unified Diff: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html

Issue 2311093002: MD WebUI: Use dom-if to control hidden elements in <cr-toolbar> (Closed)
Patch Set: Fix tests Created 4 years, 3 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: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html
index 6a61dfdd1c9c3cc8d9d1d7afca4b128abc5fc3ec..097f38c3e7afd22b5819134551f140c4cb94ae44 100644
--- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html
+++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html
@@ -112,9 +112,10 @@
-webkit-margin-start: 18px;
}
</style>
- <paper-spinner-lite
- active="[[isSpinnerShown_(spinnerActive, showingSearch)]]">
- </paper-spinner-lite>
+ <template is="dom-if" if="[[isSpinnerShown_]]">
+ <paper-spinner-lite active>
+ </paper-spinner-lite>
+ </template>
<paper-icon-button id="icon" icon="cr:search" title="[[label]]"
tabindex$="[[computeIconTabIndex_(narrow)]]">
</paper-icon-button>
@@ -124,10 +125,11 @@
<input is="iron-input" id="searchInput" type="search"
on-blur="onInputBlur_" incremental autofocus></input>
</paper-input-container>
- <paper-icon-button icon="cr:cancel" id="clearSearch"
- title="[[clearLabel]]" hidden$="[[!hasSearchText_]]"
- on-tap="hideSearch_">
- </paper-icon-button>
+ <template is="dom-if" if="[[hasSearchText_]]">
+ <paper-icon-button icon="cr:cancel" id="clearSearch"
+ title="[[clearLabel]]" on-tap="hideSearch_">
+ </paper-icon-button>
+ </template>
</template>
<script src="cr_toolbar_search_field.js"></script>
</dom-module>

Powered by Google App Engine
This is Rietveld 408576698