Chromium Code Reviews| 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} |
| */ |