diff --git a/js/angular/directive/content.js b/js/angular/directive/content.js index 56bf7998584..a368d1fc82c 100644 --- a/js/angular/directive/content.js +++ b/js/angular/directive/content.js @@ -71,7 +71,7 @@ function($timeout, $controller, $ionicBind, $ionicConfig) { element.addClass('scroll-content-false'); } - var nativeScrolling = attr.overflowScroll === "true" || !$ionicConfig.scrolling.jsScrolling(); + var nativeScrolling = attr.overflowScroll !== "false" && (attr.overflowScroll === "true" || !$ionicConfig.scrolling.jsScrolling()); // collection-repeat requires JS scrolling if (nativeScrolling) { diff --git a/js/angular/service/ionicConfig.js b/js/angular/service/ionicConfig.js index b86e202063e..7b6b86ee4f9 100644 --- a/js/angular/service/ionicConfig.js +++ b/js/angular/service/ionicConfig.js @@ -91,9 +91,9 @@ /** * @ngdoc method * @name $ionicConfigProvider#scrolling.jsScrolling - * @description Whether to use JS or Native scrolling. Defaults to JS scrolling. Setting this to - * `false` has the same effect as setting each `ion-content` to have `overflow-scroll='true'`. - * @param {boolean} value Defaults to `true` + * @description Whether to use JS or Native scrolling. Defaults to native scrolling. Setting this to + * `true` has the same effect as setting each `ion-content` to have `overflow-scroll='false'`. + * @param {boolean} value Defaults to `false` as of Ionic 1.2 * @returns {boolean} */ @@ -309,7 +309,7 @@ IonicModule }, scrolling: { - jsScrolling: true + jsScrolling: false }, spinner: { diff --git a/js/views/scrollViewNative.js b/js/views/scrollViewNative.js index ac0bce384a1..db734f6925c 100644 --- a/js/views/scrollViewNative.js +++ b/js/views/scrollViewNative.js @@ -18,6 +18,16 @@ self.__maxScrollTop = Math.max((self.__contentHeight) - self.__clientHeight, 0); self.__maxScrollLeft = Math.max((self.__contentWidth) - self.__clientWidth, 0); + if(options.startY >= 0 || options.startX >= 0) { + ionic.requestAnimationFrame(function() { + self.el.scrollTop = options.startY || 0; + self.el.scrollLeft = options.startX || 0; + + self.__scrollTop = self.el.scrollTop; + self.__scrollLeft = self.el.scrollLeft; + }) + } + self.options = { freeze: false, @@ -459,4 +469,3 @@ }); })(ionic); -