From 58c97e0d2eaab038e74435d014b12d3189bba913 Mon Sep 17 00:00:00 2001 From: Andrew Joslin Date: Mon, 12 May 2014 09:49:43 -0600 Subject: [PATCH] fix(headerBar): tap to scroll to top only on the nearest scrollview Closes #1329 --- js/angular/directive/headerFooterBar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/angular/directive/headerFooterBar.js b/js/angular/directive/headerFooterBar.js index 1218e96c425..a7bcef47227 100644 --- a/js/angular/directive/headerFooterBar.js +++ b/js/angular/directive/headerFooterBar.js @@ -98,7 +98,8 @@ function tapScrollToTopDirective() { bounds.left, bounds.top - 20, bounds.left + bounds.width, bounds.top + bounds.height )) { - $ionicScrollDelegate.scrollTop(true); + var scrollCtrl = $element.controller('$ionicScroll'); + scrollCtrl && scrollCtrl.scrollTop(true); } } }