Merge pull request #4593 from cmgustavo/bug/scroll-ios-02

Fix scrolling on iOS
This commit is contained in:
Gustavo Maximiliano Cortez 2016-07-15 10:36:05 -03:00 committed by GitHub
commit bfafb142fe
6 changed files with 16 additions and 21 deletions

View file

@ -1,4 +1,4 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
@ -19,13 +19,13 @@
<ion-side-menus class="page" ng-controller="indexController as index"> <ion-side-menus class="page" ng-controller="indexController as index">
<!-- Left menu --> <!-- Left menu -->
<ion-side-menu side="left" expose-aside-when="large" ng-if="isDisclaimerAccepted"> <ion-side-menu side="left" expose-aside-when="large" ng-if="index.hasProfile && isDisclaimerAccepted">
<div ng-include="'views/includes/sidebar.html'" ng-if="index.hasProfile"></div> <div ng-include="'views/includes/sidebar.html'"></div>
</ion-side-menu> </ion-side-menu>
<!-- Main content --> <!-- Main content -->
<ion-side-menu-content drag-content="index.isCordova && index.allowSideBar"> <ion-side-menu-content drag-content="index.isCordova">
<div notifications="right top"></div> <div notifications="right top"></div>
<div id="sectionContainer"> <div id="sectionContainer">
<div id="mainSection"> <div id="mainSection">

View file

@ -8,10 +8,10 @@
<div class="create-tab small-only-text-center" ng-hide="create.hideTabs"> <div class="create-tab small-only-text-center" ng-hide="create.hideTabs">
<div class="row"> <div class="row">
<div class="tab-container small-6 medium-6 large-6" ng-class="{'selected': totalCopayers == 1}"> <div class="tab-container small-6 medium-6 large-6 columns" ng-class="{'selected': totalCopayers == 1}">
<a href ng-click="create.setTotalCopayers(1)" translate>Personal Wallet</a> <a href ng-click="create.setTotalCopayers(1)" translate>Personal Wallet</a>
</div> </div>
<div class="tab-container small-6 medium-6 large-6" ng-class="{'selected': totalCopayers != 1}"> <div class="tab-container small-6 medium-6 large-6 columns" ng-class="{'selected': totalCopayers != 1}">
<a href ng-click="create.setTotalCopayers(3)" translate>Shared Wallet</a> <a href ng-click="create.setTotalCopayers(3)" translate>Shared Wallet</a>
</div> </div>
</div> </div>
@ -160,5 +160,5 @@
</div> <!-- large-12 columns --> </div> <!-- large-12 columns -->
</div> <!-- row --> </div> <!-- row -->
</form> </form>
</div>
<div class="extra-margin-bottom"></div> <div class="extra-margin-bottom"></div>
</div>

View file

@ -23,14 +23,14 @@
</div> </div>
<div translate>Create, join or import</div> <div translate>Create, join or import</div>
</li> </li>
<li ng-show="!index.isWindowsPhoneApp && (index.glideraEnabled || index.coinbaseEnabled)" menu-toggle href ui-sref="buyandsell"> <li ng-show="!index.noFocusedWallet && !index.isWindowsPhoneApp && (index.glideraEnabled || index.coinbaseEnabled)" menu-toggle href ui-sref="buyandsell">
<i class="icon-arrow-right3 size-18 right m10t vm"></i> <i class="icon-arrow-right3 size-18 right m10t vm"></i>
<i class="icon-bank size-24 icon vm"></i> <i class="icon-bank size-24 icon vm"></i>
<div class="tu text-bold m5t"> <div class="tu text-bold m5t">
<span class="size-12" translate>Buy and Sell</span> <span class="size-12" translate>Buy and Sell</span>
</div> </div>
</li> </li>
<li menu-toggle href ui-sref="preferencesGlobal"> <li ng-show="!index.noFocusedWallet" menu-toggle href ui-sref="preferencesGlobal">
<i class="icon-arrow-right3 size-18 right m10t vm"></i> <i class="icon-arrow-right3 size-18 right m10t vm"></i>
<i class="fi-widget size-24 icon vm"></i> <i class="fi-widget size-24 icon vm"></i>
<div class="tu text-bold"> <div class="tu text-bold">

View file

@ -35,11 +35,10 @@
--> -->
<div id="walletHome" class="walletHome tab-view tab-in"> <div id="walletHome" class="walletHome tab-view tab-in">
<ion-content on-release="index.allowSideBar = true; index.allowPullToRefresh = true;" <ion-content on-release="index.allowPullToRefresh = true;"
on-drag-right="index.allowRefresher()" delegate-handle="my-handle" overflow-scroll="true"> on-drag-right="index.allowRefresher()" delegate-handle="my-handle" overflow-scroll="true">
<ion-refresher <ion-refresher
ng-if="index.allowPullToRefresh && index.isCordova" ng-if="index.allowPullToRefresh && index.isCordova"
on-pulling="index.allowSideBar = false"
pulling-icon="ion-ios-refresh" pulling-icon="ion-ios-refresh"
spinner="ios-small" spinner="ios-small"
on-refresh="index.updateAll({triggerTxUpdate: true})"> on-refresh="index.updateAll({triggerTxUpdate: true})">

View file

@ -70,12 +70,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
}; };
self.allowRefresher = function() { self.allowRefresher = function() {
if ($ionicSideMenuDelegate.getOpenRatio() != 0) { if ($ionicSideMenuDelegate.getOpenRatio() != 0) self.allowPullToRefresh = false;
self.allowPullToRefresh = false;
if (isCordova && platformInfo.isIOS) $ionicScrollDelegate.$getByHandle('my-handle').freezeScroll(true);
return;
}
if (isCordova && platformInfo.isIOS) $ionicScrollDelegate.$getByHandle('my-handle').freezeScroll(false);
} }
self.hideBalance = function() { self.hideBalance = function() {

View file

@ -539,16 +539,17 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
window.addEventListener('native.keyboardhide', function() { window.addEventListener('native.keyboardhide', function() {
$timeout(function() { $timeout(function() {
$rootScope.shouldHideMenuBar = false; //show menu bar when keyboard is hidden with back button action on send screen $rootScope.shouldHideMenuBar = false; //show menu bar when keyboard is hidden with back button action on send screen
}, 300); }, 100);
}); });
window.addEventListener('native.keyboardshow', function() { window.addEventListener('native.keyboardshow', function() {
$rootScope.shouldHideMenuBar = true; //hide menu bar when keyboard opens with back button action on send screen $timeout(function() {
$rootScope.$digest(); $rootScope.shouldHideMenuBar = true; //hide menu bar when keyboard opens with back button action on send screen
}, 300);
}); });
if (window.cordova.plugins.Keyboard) { if (window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
cordova.plugins.Keyboard.disableScroll(false); cordova.plugins.Keyboard.disableScroll(false);
} }