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

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: Condense syncWidthToInput 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 46ba8d20e92b9226a9f60bbbbaa7304c80386d7d..6f6369003a4660931c678fc44a5027ca3765482f 100644
--- a/chrome/browser/resources/options/autocomplete_list.js
+++ b/chrome/browser/resources/options/autocomplete_list.js
@@ -169,6 +169,16 @@ 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)
+ 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