mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	electron: Fix alt+left, alt+right navigation
Broken due to a change in Electron API: https://github.com/electron/electron/pull/41577/files
This commit is contained in:
		
							parent
							
								
									f3641e5fa6
								
							
						
					
					
						commit
						743fee2783
					
				@ -102,7 +102,7 @@ export default class Entrypoints extends Component {
 | 
			
		||||
        if (utils.isElectron()) {
 | 
			
		||||
            // standard JS version does not work completely correctly in electron
 | 
			
		||||
            const webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents();
 | 
			
		||||
            const activeIndex = parseInt(webContents.getActiveIndex());
 | 
			
		||||
            const activeIndex = parseInt(webContents.navigationHistory.getActiveIndex());
 | 
			
		||||
 | 
			
		||||
            webContents.goToIndex(activeIndex - 1);
 | 
			
		||||
        }
 | 
			
		||||
@ -115,7 +115,7 @@ export default class Entrypoints extends Component {
 | 
			
		||||
        if (utils.isElectron()) {
 | 
			
		||||
            // standard JS version does not work completely correctly in electron
 | 
			
		||||
            const webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents();
 | 
			
		||||
            const activeIndex = parseInt(webContents.getActiveIndex());
 | 
			
		||||
            const activeIndex = parseInt(webContents.navigationHistory.getActiveIndex());
 | 
			
		||||
 | 
			
		||||
            webContents.goToIndex(activeIndex + 1);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user