iOS: Tab on keyboard leads to crash

Hi,

I have a view which contains two modal views. One of the modals has a form with multiple input and select boxes. When I am inside the modal view and switch focus (with the arrows on the iPad), too many times, it seems to run out of bound and the whole app crashes. What went wrong here?

The code is structured this way:

// order view
<ion-view title="parent" cache-view="false">
    ... some buttons ....
    <ion-content overflow-scroll="false">
        <uib-accordion close-others="true">
            ...
            <div ng-include src="'templates/partials/some_stuff.html'"></div>
            ...
        </uib-accordion>
    </ion-content>
</ion-view>

// modal
<ion-modal-view ng-controller="myModalControl" data-ng-init="init()">
    <form name="myForm" novalidate="">
        <ion-header-bar>
            <div class="buttons">
                <button ng-disabled="myForm.$invalid" ng-click="saveChanges()" class="button button-clear button-positive">
                    Save <i class="icon ion-ios-arrow-forward"></i>
                </button>
        </ion-header-bar>

        <ion-content overflow-scroll="false" class="has-header">
            ... lots of input and select fields ...
        </ion-content>
    </form>
</ion-modal-view>

// order controller
angular.module('app.controllers')
    .controller('parentCtrl', function ($rootScope, $scope,...) {
        $ionicModal.fromTemplateUrl('templates/modals/myModal.html', {
            id: "myModal",
            scope: $scope,
            animation: 'none'
        }).then(function (modal) {
            $scope.myModal = modal;
        });

        // The modal is opened when entering the parent page
        $scope.$on("$ionicView.enter", function () {
            $scope.myModal.show();
        });
    })

I have same issue. Did you solve this problem?

Unfortunately no. I’ve overridden the enter key to set focus on the next element for the time being. But that’s just a really bad workaround that doesn’t prevent the user from still using the arrows and crash the app.