mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	Merge pull request #267 from geeeeeeeeek/window-focus-fix
Enhance error handling.
This commit is contained in:
		@@ -109,9 +109,10 @@ class WebView extends BaseComponent {
 | 
				
			|||||||
		// Explicit focusing the webview causes a bug the input cannot regain focus on Winodws.
 | 
							// Explicit focusing the webview causes a bug the input cannot regain focus on Winodws.
 | 
				
			||||||
		// The bug is introduced from Electron and this is a tempory fix.
 | 
							// The bug is introduced from Electron and this is a tempory fix.
 | 
				
			||||||
		// See https://github.com/zulip/zulip-electron/issues/216
 | 
							// See https://github.com/zulip/zulip-electron/issues/216
 | 
				
			||||||
		if (!this.$el.getWebContents().isFocused()) {
 | 
							const webContents = this.$el.getWebContents();
 | 
				
			||||||
 | 
							if (webContents && !webContents.isFocused()) {
 | 
				
			||||||
			this.$el.focus();
 | 
								this.$el.focus();
 | 
				
			||||||
			this.$el.getWebContents().focus();
 | 
								webContents.focus();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user