File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 5353    . run ( checkIfLatestVersion ) 
5454    . run ( showWelcomeDialog ) 
5555    . run ( initUnloadActions ) 
56+     . run ( initInputFocusFixForAndroid ) 
5657    . run ( initElectronOnBeforeQuit ) ; 
5758
5859  /* @ngInject  */ 
427428    } ; 
428429  } 
429430
431+   function  initInputFocusFixForAndroid ( )  { 
432+     // dirty hack to fix inputs not being visible when the keyboard open 
433+     if  ( / A n d r o i d / . test ( navigator . appVersion ) )  { 
434+       window . addEventListener ( 'resize' ,  function ( )  { 
435+         if  ( document . activeElement . tagName  ===  'INPUT'  || 
436+           document . activeElement . tagName  ===  'TEXTAREA'  || 
437+           document . activeElement . getAttribute ( 'contenteditable' ) )  { 
438+           window . setTimeout ( function ( )  { 
439+             document . activeElement . scrollIntoViewIfNeeded ( ) ; 
440+           } ,  0 ) ; 
441+         } 
442+       } ) ; 
443+     } 
444+   } 
445+ 
430446} ) ( ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments