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

Unified Diff: chrome/browser/resources/bookmark_manager/main.html

Issue 5530006: Bookmarks manager: Use onsearch and incremental instead of a timer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/bookmark_manager/main.html
diff --git a/chrome/browser/resources/bookmark_manager/main.html b/chrome/browser/resources/bookmark_manager/main.html
index 856fe2b434de5a1c532a228345a4e03d6c53cc38..8e30a45442dfd9f7aa51cd3f54215eb21afeae1a 100644
--- a/chrome/browser/resources/bookmark_manager/main.html
+++ b/chrome/browser/resources/bookmark_manager/main.html
@@ -55,7 +55,7 @@ found in the LICENSE file.
<button class="logo" tabindex=3></button>
<form onsubmit="setSearch(this.term.value); return false;"
class="form">
- <input type="search" id="term" tabindex=1 autofocus
+ <input type="search" id="term" tabindex=1 autofocus incremental
i18n-values="placeholder:search_button">
</form>
</div>
@@ -330,18 +330,8 @@ list.addEventListener('urlClicked', function(e) {
getLinkController().openUrlFromEvent(e.url, e.originalEvent);
});
-/**
- * Timer id used for delaying find-as-you-type
- */
-var inputDelayTimer;
-
-// Capture input changes to the search term input element and delay searching
-// for 250ms to reduce flicker.
-$('term').oninput = function(e) {
- clearTimeout(inputDelayTimer);
- inputDelayTimer = setTimeout(function() {
- setSearch($('term').value);
- }, 250);
+$('term').onsearch = function(e) {
+ setSearch(this.value);
};
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698