File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -287,11 +287,12 @@ angular.module('mm.core', ['pascalprecht.translate'])
287287 }
288288 } ) ;
289289
290- if ( ! $mmApp . isDevice ( ) ) {
291- // Re-define getParentOrSelfWithClass to change the default value of the depth param.
292- // This is to allow scrolling with trackpad when hovering deep elements.
293- var originalFunction = ionic . DomUtil . getParentOrSelfWithClass ;
294- ionic . DomUtil . getParentOrSelfWithClass = function ( e , className , depth ) {
290+ // In desktop, re-define getParentOrSelfWithClass to allow scrolling with trackpad when hovering deep elements.
291+ // In iOS, re-define getParentWithClass to prevent the keyboard to hide deep input elements.
292+ var fnName = ! $mmApp . isDevice ( ) ? 'getParentOrSelfWithClass' : ( ionic . Platform . isIOS ( ) ? 'getParentWithClass' : '' ) ;
293+ if ( fnName ) {
294+ var originalFunction = ionic . DomUtil [ fnName ] ;
295+ ionic . DomUtil [ fnName ] = function ( e , className , depth ) {
295296 depth = depth || 20 ;
296297 return originalFunction ( e , className , depth ) ;
297298 } ;
You can’t perform that action at this time.
0 commit comments