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

Unified Diff: chrome/browser/resources/ntp/apps.js

Issue 3771007: Scroll new apps into view when they are installed. (Closed)
Patch Set: different way to adjust spacing Created 10 years, 2 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 | « chrome/browser/resources/ntp/apps.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp/apps.js
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 9f4daa0d1979c82cff893329baf8852cc9886ec1..2694cbeb8d67d40b8ebbce30fecd14b71157c66e 100644
--- a/chrome/browser/resources/ntp/apps.js
+++ b/chrome/browser/resources/ntp/apps.js
@@ -244,6 +244,9 @@ var apps = (function() {
div.setAttribute('new', 'new');
// Delay changing the attribute a bit to let the page settle down a bit.
setTimeout(function() {
+ // Make sure the new icon is scrolled into view.
+ document.body.scrollTop = document.body.scrollHeight;
+
// This will trigger the 'bounce' animation defined in apps.css.
div.setAttribute('new', 'installed');
}, 500);
« no previous file with comments | « chrome/browser/resources/ntp/apps.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698