mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(modal): focus on inputs under keyboard
This commit is contained in:
2
js/angular/service/history.js
vendored
2
js/angular/service/history.js
vendored
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user