fix(modal): focus on inputs under keyboard

This commit is contained in:
Adam Bradley
2014-12-06 22:44:00 -06:00
parent 9f1f86d18b
commit 12bb8de55e
2 changed files with 2 additions and 2 deletions

View File

@@ -691,7 +691,7 @@ function($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $
function($rootScope, $state, $location, $document, $ionicPlatform, $ionicHistory) {
// always reset the keyboard state when change stage
$rootScope.$on('$stateChangeStart', function() {
$rootScope.$on('$ionicView.beforeEnter', function() {
ionic.keyboard && ionic.keyboard.hide && ionic.keyboard.hide();
});

View File

@@ -629,7 +629,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
if ( !self.isScrolledIntoView ) {
// shrink scrollview so we can actually scroll if the input is hidden
// if it isn't shrink so we can scroll to inputs under the keyboard
if ((ionic.Platform.isIOS() || ionic.Platform.isFullScreen) && !container.parentNode.classList.contains('modal')){
if ((ionic.Platform.isIOS() || ionic.Platform.isFullScreen)){
// if there are things below the scroll view account for them and
// subtract them from the keyboard height when resizing