File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ angular.module('mm.core', ['pascalprecht.translate'])
277277 }
278278 }
279279 } ) ;
280+
280281 $window . addEventListener ( 'native.keyboardhide' , function ( e ) {
281282 $mmEvents . trigger ( mmCoreEventKeyboardHide , e ) ;
282283
@@ -285,6 +286,16 @@ angular.module('mm.core', ['pascalprecht.translate'])
285286 ionic . trigger ( 'resize' ) ;
286287 }
287288 } ) ;
289+
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 ) {
295+ depth = depth || 20 ;
296+ return originalFunction ( e , className , depth ) ;
297+ } ;
298+ }
288299 } ) ;
289300
290301 // Send event when device goes online.
You can’t perform that action at this time.
0 commit comments