Chromium Code Reviews| Index: chrome/browser/resources/extensions/extension_list.js |
| diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js |
| index 7d6187ae2b76e2f41357402194d01065490b3563..47ce78b707ec1ab09932167573b1a6e1a0b7eef2 100644 |
| --- a/chrome/browser/resources/extensions/extension_list.js |
| +++ b/chrome/browser/resources/extensions/extension_list.js |
| @@ -59,8 +59,10 @@ cr.define('options', function() { |
| // the way at the top. That way it is clear that there are more elements |
| // above the element being scrolled to. |
| var scrollFudge = 1.2; |
| - document.documentElement.scrollTop = $(idToHighlight).offsetTop - |
| - scrollFudge * $(idToHighlight).clientHeight; |
| + var scrollTop = |
| + $(idToHighlight).offsetTop - scrollFudge * |
| + $(idToHighlight).clientHeight; |
|
Dan Beam
2013/11/13 23:31:07
nit: var scrollTop = $(idToHighlight).offsetTop -
|
| + setScrollTopForDocument(document, scrollTop); |
| } |
| if (this.data_.extensions.length == 0) |
| @@ -336,7 +338,7 @@ cr.define('options', function() { |
| var pad = parseInt(getComputedStyle(node, null).marginTop, 10); |
| if (!isNaN(pad)) |
| topScroll -= pad / 2; |
| - document.documentElement.scrollTop = topScroll; |
| + setScrollTopForDocument(document, topScroll); |
| } |
| }, |
| }; |