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

Unified Diff: ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html

Issue 2182853002: MD WebUI: rework how clearing search works (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tsergeant@ review Created 4 years, 5 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_search_field/cr_search_field.html
diff --git a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html
index bbf300218adaef3d726b5cf1f76da726fe579b76..03cc4275968c40287cd2a02e8482e67779d441c5 100644
--- a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html
+++ b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html
@@ -10,15 +10,17 @@
<template>
<paper-icon-button icon="cr:search" id="searchButton"
disabled$="[[showingSearch]]" title="[[label]]"
- on-click="toggleShowingSearch_"></paper-icon-button>
+ on-tap="toggleShowingSearch_"></paper-icon-button>
<paper-input-container id="searchTerm" on-search="onSearchTermSearch"
on-keydown="onSearchTermKeydown" hidden$="[[!showingSearch]]"
no-label-float>
<input is="iron-input" id="searchInput" type="search"
- placeholder="[[label]]" incremental>
- <paper-icon-button icon="cr:cancel" id="clearSearch"
- on-click="toggleShowingSearch_" title="[[clearLabel]]"
- hidden$="[[!showingSearch]]"></paper-icon-button>
+ bind-value="{{value_}}" placeholder="[[label]]" incremental>
+ <template is="dom-if" if="[[value_]]">
+ <paper-icon-button icon="cr:cancel" on-tap="clearSearch_"
+ title="[[clearLabel]]" hidden$="[[!showingSearch]]">
+ </paper-icon-button>
+ </template>
</paper-input-container>
</template>
<link rel="import" type="css" href="cr_search_field.css">

Powered by Google App Engine
This is Rietveld 408576698