From 6665eac870925973bffd704355b09fec824f8085 Mon Sep 17 00:00:00 2001 From: Andres Olave Date: Thu, 4 Dec 2014 09:01:44 +0200 Subject: [PATCH 1/2] Add support for trigger.io --- js/utils/platform.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/utils/platform.js b/js/utils/platform.js index 94f3110ca22..4776da591d0 100644 --- a/js/utils/platform.js +++ b/js/utils/platform.js @@ -115,7 +115,11 @@ if (this.isWebView()) { this.platforms.push('webview'); - this.platforms.push('cordova'); + if(!(!window.cordova && !window.PhoneGap && !window.phonegap)) { + this.platforms.push('cordova'); + } else if(!!window.forge) { + this.platforms.push('trigger'); + } } else { this.platforms.push('browser'); } @@ -153,7 +157,7 @@ * @returns {boolean} Check if we are running within a WebView (such as Cordova). */ isWebView: function() { - return !(!window.cordova && !window.PhoneGap && !window.phonegap); + return !(!window.cordova && !window.PhoneGap && !window.phonegap && !window.forge); }, /** * @ngdoc method From c96af221a7c4edb68a91a867c4663c1efa23fb4e Mon Sep 17 00:00:00 2001 From: Andres Olave Date: Mon, 29 Dec 2014 20:38:09 +0200 Subject: [PATCH 2/2] Remove blurAll calls --- js/angular/controller/scrollController.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/js/angular/controller/scrollController.js b/js/angular/controller/scrollController.js index b81ac2070f5..59246fb8c74 100644 --- a/js/angular/controller/scrollController.js +++ b/js/angular/controller/scrollController.js @@ -101,14 +101,12 @@ function($scope, scrollViewOptions, $timeout, $window, $location, $document, $io }; self.scrollTop = function(shouldAnimate) { - ionic.DomUtil.blurAll(); self.resize().then(function() { scrollView.scrollTo(0, 0, !!shouldAnimate); }); }; self.scrollBottom = function(shouldAnimate) { - ionic.DomUtil.blurAll(); self.resize().then(function() { var max = scrollView.getScrollMax(); scrollView.scrollTo(max.left, max.top, !!shouldAnimate); @@ -116,35 +114,30 @@ function($scope, scrollViewOptions, $timeout, $window, $location, $document, $io }; self.scrollTo = function(left, top, shouldAnimate) { - ionic.DomUtil.blurAll(); self.resize().then(function() { scrollView.scrollTo(left, top, !!shouldAnimate); }); }; self.zoomTo = function(zoom, shouldAnimate, originLeft, originTop) { - ionic.DomUtil.blurAll(); self.resize().then(function() { scrollView.zoomTo(zoom, !!shouldAnimate, originLeft, originTop); }); }; self.zoomBy = function(zoom, shouldAnimate, originLeft, originTop) { - ionic.DomUtil.blurAll(); self.resize().then(function() { scrollView.zoomBy(zoom, !!shouldAnimate, originLeft, originTop); }); }; self.scrollBy = function(left, top, shouldAnimate) { - ionic.DomUtil.blurAll(); self.resize().then(function() { scrollView.scrollBy(left, top, !!shouldAnimate); }); }; self.anchorScroll = function(shouldAnimate) { - ionic.DomUtil.blurAll(); self.resize().then(function() { var hash = $location.hash(); var elm = hash && $document[0].getElementById(hash);