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

Unified Diff: chrome/browser/resources/options/autocomplete_list.js

Issue 6898001: WebUI Prefs: Resize autocomplete list on window resize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/autocomplete_list.js
diff --git a/chrome/browser/resources/options/autocomplete_list.js b/chrome/browser/resources/options/autocomplete_list.js
index ff85b1b7fad3601d03ee9b85b813fa91ec868ca8..1a101d54ab33aa274469ec6090eee73c0e3ee5b1 100644
--- a/chrome/browser/resources/options/autocomplete_list.js
+++ b/chrome/browser/resources/options/autocomplete_list.js
@@ -169,6 +169,18 @@ cr.define('options', function() {
},
/**
+ * Makes sure that the suggestion list matches the width of the input it is.
+ * attached to. Should be called any time the input is resized.
+ */
+ syncWidthToInput: function() {
+ var input = this.targetInput_
+ if (!input)
csilv 2011/04/22 00:10:55 I'd prefer to make this more concise by saying: i
+ return;
+
+ this.style.width = input.getBoundingClientRect().width + 'px';
+ },
+
+ /**
* The text field the autocomplete popup is currently attached to, if any.
* @return {HTMLElement}
*/
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698