Commit bce15107c89b525f5de0ddabc5b2621856285502
1 parent
d3bb6db7
Exists in
master
and in
6 other branches
Fix scroll bug - Fixes #41
Showing
6 changed files
with
8 additions
and
8 deletions
Show diff stats
src/app/components/app-navbar/app-navbar.directive.js
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | 19 | ||
20 | // NavbarController.prototype.scrollTo = function (hash){ | 20 | // NavbarController.prototype.scrollTo = function (hash){ |
21 | // var $el = angular.element('#' + hash); | 21 | // var $el = angular.element('#' + hash); |
22 | - // angular.element('body').animate({scrollTop: $el.offset().top}, 'slow'); | 22 | + // angular.element('html,body').animate({scrollTop: $el.offset().top}, 'slow'); |
23 | // }; | 23 | // }; |
24 | 24 | ||
25 | NavbarController.prototype.onClickLogout = function (){ | 25 | NavbarController.prototype.onClickLogout = function (){ |
src/app/components/topic-list/topic-list.directive.js
@@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
55 | 55 | ||
56 | if (!angular.equals({}, vm.search)) { | 56 | if (!angular.equals({}, vm.search)) { |
57 | var $el = vm.$element; | 57 | var $el = vm.$element; |
58 | - angular.element('body').animate({scrollTop: $el.offset().top}, 'slow'); | 58 | + angular.element('html,body').animate({scrollTop: $el.offset().top}, 'slow'); |
59 | } | 59 | } |
60 | 60 | ||
61 | // update window location params | 61 | // update window location params |
src/app/pages/inicio/inicio.controller.js
@@ -156,7 +156,7 @@ | @@ -156,7 +156,7 @@ | ||
156 | } | 156 | } |
157 | 157 | ||
158 | vm.$timeout(function() { | 158 | vm.$timeout(function() { |
159 | - angular.element('body').animate({scrollTop: scrollTop}, 'fast'); | 159 | + angular.element('html,body').animate({scrollTop: scrollTop}, 'fast'); |
160 | }, 0); // force queue | 160 | }, 0); // force queue |
161 | } | 161 | } |
162 | }; | 162 | }; |
@@ -222,7 +222,7 @@ | @@ -222,7 +222,7 @@ | ||
222 | // scroll to result grid | 222 | // scroll to result grid |
223 | var $searchResult = angular.element('#search-result'); | 223 | var $searchResult = angular.element('#search-result'); |
224 | if ($searchResult && $searchResult.length > 0) { | 224 | if ($searchResult && $searchResult.length > 0) { |
225 | - angular.element('body').animate({scrollTop: $searchResult.offset().top}, 'fast'); | 225 | + angular.element('html,body').animate({scrollTop: $searchResult.offset().top}, 'fast'); |
226 | vm.filtredPrograms = vm.getFiltredPrograms(); | 226 | vm.filtredPrograms = vm.getFiltredPrograms(); |
227 | }else { | 227 | }else { |
228 | vm.$log.warn('#search-result element not found.'); | 228 | vm.$log.warn('#search-result element not found.'); |
src/app/pages/programas/programa.controller.js
@@ -181,7 +181,7 @@ | @@ -181,7 +181,7 @@ | ||
181 | vm.$timeout(function() { | 181 | vm.$timeout(function() { |
182 | var target = angular.element('.focused-proposal'); | 182 | var target = angular.element('.focused-proposal'); |
183 | if (target && target.length > 0) { | 183 | if (target && target.length > 0) { |
184 | - angular.element('body').animate({scrollTop: target.offset().top}, 'fast'); | 184 | + angular.element('html,body').animate({scrollTop: target.offset().top}, 'fast'); |
185 | } | 185 | } |
186 | }, 300); | 186 | }, 300); |
187 | } | 187 | } |
@@ -248,7 +248,7 @@ | @@ -248,7 +248,7 @@ | ||
248 | var vm = this; | 248 | var vm = this; |
249 | var el = vm.$element.find(rule); | 249 | var el = vm.$element.find(rule); |
250 | el.slideDown(); | 250 | el.slideDown(); |
251 | - angular.element('body').animate({scrollTop: el.offset().top}, 'fast'); | 251 | + angular.element('html,body').animate({scrollTop: el.offset().top}, 'fast'); |
252 | }; | 252 | }; |
253 | 253 | ||
254 | ProgramaPageController.prototype.findAndHide = function(rule) { | 254 | ProgramaPageController.prototype.findAndHide = function(rule) { |
src/app/pages/programas/programas.controller.js
@@ -147,7 +147,7 @@ | @@ -147,7 +147,7 @@ | ||
147 | // scroll to result grid | 147 | // scroll to result grid |
148 | var $searchResult = angular.element('#search-result'); | 148 | var $searchResult = angular.element('#search-result'); |
149 | if ($searchResult && $searchResult.length > 0) { | 149 | if ($searchResult && $searchResult.length > 0) { |
150 | - angular.element('body').animate({scrollTop: $searchResult.offset().top}, 'fast'); | 150 | + angular.element('html,body').animate({scrollTop: $searchResult.offset().top}, 'fast'); |
151 | vm.filtredPrograms = vm.getFiltredPrograms(); | 151 | vm.filtredPrograms = vm.getFiltredPrograms(); |
152 | }else { | 152 | }else { |
153 | vm.$log.warn('#search-result element not found.'); | 153 | vm.$log.warn('#search-result element not found.'); |
src/app/pages/propostas/propostas.controller.js
@@ -170,7 +170,7 @@ | @@ -170,7 +170,7 @@ | ||
170 | // scroll to result grid | 170 | // scroll to result grid |
171 | var $searchResult = angular.element('#search-result'); | 171 | var $searchResult = angular.element('#search-result'); |
172 | if ($searchResult && $searchResult.length > 0) { | 172 | if ($searchResult && $searchResult.length > 0) { |
173 | - angular.element('body').animate({scrollTop: $searchResult.offset().top}, 'fast'); | 173 | + angular.element('html,body').animate({scrollTop: $searchResult.offset().top}, 'fast'); |
174 | vm.filterProposals(); | 174 | vm.filterProposals(); |
175 | }else { | 175 | }else { |
176 | vm.$log.warn('#search-result element not found.'); | 176 | vm.$log.warn('#search-result element not found.'); |