Skip to content
Browse files

Bug 817169 - When homescreen loads it can jerk the user around [r=vin…

…gtetun]
  • Loading branch information...
1 parent 5c26753 commit 5212c03c070f4e70a720cced3a6f60395f19ad90 @crdlc crdlc committed with samjoch Dec 10, 2012
Showing with 11 additions and 2 deletions.
  1. +1 −1 apps/homescreen/index.html
  2. +5 −1 apps/homescreen/js/homescreen.js
  3. +5 −0 apps/homescreen/style/grid.css
View
2 apps/homescreen/index.html
@@ -24,13 +24,13 @@
<!-- Specific code -->
<script type="text/javascript" defer src="js/message.js"></script>
+ <script type="text/javascript" defer src="js/landing.js"></script>
<script type="text/javascript" defer src="js/request.js"></script>
<script type="text/javascript" defer src="js/bookmark.js"></script>
<script type="text/javascript" defer src="js/state.js"></script>
<script type="text/javascript" defer src="js/page.js"></script>
<script type="text/javascript" defer src="js/pagbar.js"></script>
<script type="text/javascript" defer src="js/dock.js"></script>
- <script type="text/javascript" defer src="js/landing.js"></script>
<script type="text/javascript" defer src="js/grid.js"></script>
<script type="text/javascript" defer src="js/dragdrop.js"></script>
<script type="text/javascript" defer src="everything.me/js/everything.me.js"></script>
View
6 apps/homescreen/js/homescreen.js
@@ -16,7 +16,11 @@ const Homescreen = (function() {
PaginationBar.init('.paginationScroller');
GridManager.init('.apps', '.dockWrapper', function gm_init() {
PaginationBar.show();
- GridManager.goToPage(1);
+ if (document.location.hash === '#root') {
+ // Switch to the first page only if the user has not already start to pan
+ // while home is loading
+ GridManager.goToPage(1);
+ }
DragDropManager.init();
Wallpaper.init();
});
View
5 apps/homescreen/style/grid.css
@@ -14,6 +14,11 @@
display: none;
}
+/* Here users can view the clock while grid is loading -> better experience */
+#landing-page {
+ display: block;
+}
+
.apps ol {
width: -moz-calc(4 * 8rem);
padding: 0;

0 comments on commit 5212c03

Please sign in to comment.
Something went wrong with that request. Please try again.