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">
<head>
<meta charset="utf-8">
@ -19,13 +19,13 @@
<ion-side-menus class="page" ng-controller="indexController as index">
<!-- Left menu -->
<ion-side-menu side="left" expose-aside-when="large" ng-if="isDisclaimerAccepted">
<div ng-include="'views/includes/sidebar.html'" ng-if="index.hasProfile"></div>
<ion-side-menu side="left" expose-aside-when="large" ng-if="index.hasProfile && isDisclaimerAccepted">
<div ng-include="'views/includes/sidebar.html'"></div>
</ion-side-menu>
<!-- 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 id="sectionContainer">
<div id="mainSection">

View file

@ -8,10 +8,10 @@
<div class="create-tab small-only-text-center" ng-hide="create.hideTabs">
<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>
</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>
</div>
</div>
@ -160,5 +160,5 @@
</div> <!-- large-12 columns -->
</div> <!-- row -->
</form>
</div>
<div class="extra-margin-bottom"></div>
</div>

View file

@ -23,14 +23,14 @@
</div>
<div translate>Create, join or import</div>
</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-bank size-24 icon vm"></i>
<div class="tu text-bold m5t">
<span class="size-12" translate>Buy and Sell</span>
</div>
</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="fi-widget size-24 icon vm"></i>
<div class="tu text-bold">

View file

@ -35,11 +35,10 @@
-->
<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">
<ion-refresher
ng-if="index.allowPullToRefresh && index.isCordova"
on-pulling="index.allowSideBar = false"
pulling-icon="ion-ios-refresh"
spinner="ios-small"
on-refresh="index.updateAll({triggerTxUpdate: true})">

View file

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

View file

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