summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordvh@chromium.org <dvh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-27 00:20:34 +0000
committerdvh@chromium.org <dvh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-27 00:20:34 +0000
commitdcded35c3b94676e599dab6d8e4c8b815093f4a6 (patch)
tree441f1babfe57ac389303938e36c10be43f8bac3d
parentb954da4767c7e4d47d217a07c3152b07a093f1ac (diff)
downloadchromium_src-dcded35c3b94676e599dab6d8e4c8b815093f4a6.zip
chromium_src-dcded35c3b94676e599dab6d8e4c8b815093f4a6.tar.gz
chromium_src-dcded35c3b94676e599dab6d8e4c8b815093f4a6.tar.bz2
Automatic scroll to show the application when loading an unpacked application has been broken when the UI overhaul has been applied.
It's fixed by this patch. BUG=275995 Review URL: https://chromiumcodereview.appspot.com/23011048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219649 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/apps_debugger/js/items_list.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/resources/apps_debugger/js/items_list.js b/chrome/browser/resources/apps_debugger/js/items_list.js
index 2f60b18..61d01af 100644
--- a/chrome/browser/resources/apps_debugger/js/items_list.js
+++ b/chrome/browser/resources/apps_debugger/js/items_list.js
@@ -599,17 +599,16 @@ cr.define('apps_dev_tool', function() {
// Scroll relatively to the position of the first item.
var header = tabNode.querySelector('.unpacked-list .list-header');
- var container = $('container');
- if (node.offsetTop - header.offsetTop < container.scrollTop) {
+ if (node.offsetTop - header.offsetTop < tabNode.scrollTop) {
// Some padding between the top edge and the node is already provided
// by the HTML layout.
- container.scrollTop = node.offsetTop - header.offsetTop;
- } else if (node.offsetTop + node.offsetHeight > container.scrollTop +
- container.offsetHeight + 20) {
+ tabNode.scrollTop = node.offsetTop - header.offsetTop;
+ } else if (node.offsetTop + node.offsetHeight > tabNode.scrollTop +
+ tabNode.offsetHeight + 20) {
// Adds padding of 20px between the bottom edge and the bottom of the
// node.
- container.scrollTop = node.offsetTop + node.offsetHeight -
- container.offsetHeight + 20;
+ tabNode.scrollTop = node.offsetTop + node.offsetHeight -
+ tabNode.offsetHeight + 20;
}
};