diff --git a/js/angular/service/modal.js b/js/angular/service/modal.js index 9b8db96a764..73ee83a2fd3 100644 --- a/js/angular/service/modal.js +++ b/js/angular/service/modal.js @@ -185,6 +185,13 @@ function($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTempl return $timeout(function() { if (!self._isShown) return; + self.$el.on('touchmove', function(e) { + //Don't allow scrolling while open by dragging on backdrop + var isInScroll = ionic.DomUtil.getParentOrSelfWithClass(e.target, 'scroll'); + if(!isInScroll) { + e.preventDefault(); + } + }) //After animating in, allow hide on backdrop click self.$el.on('click', function(e) { if (self.backdropClickToClose && e.target === self.el && stack.isHighest(self)) { diff --git a/js/views/scrollViewNative.js b/js/views/scrollViewNative.js index 62d63cbbe73..e3595125c55 100644 --- a/js/views/scrollViewNative.js +++ b/js/views/scrollViewNative.js @@ -333,6 +333,7 @@ var alreadyShrunk = self.isShrunkForKeyboard; var isModal = container.parentNode.classList.contains('modal'); + var isPopover = container.parentNode.classList.contains('popover'); // 680px is when the media query for 60% modal width kicks in var isInsetModal = isModal && window.innerWidth >= 680; @@ -352,7 +353,7 @@ // 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 // inset modals won't shrink on Android on their own when the keyboard appears - if ( ionic.Platform.isIOS() || ionic.Platform.isFullScreen || isInsetModal ) { + if ( !isPopover && (ionic.Platform.isIOS() || ionic.Platform.isFullScreen || isInsetModal) ) { // if there are things below the scroll view account for them and // subtract them from the keyboard height when resizing // E - D E D