mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-04 05:53:21 +00:00 
			
		
		
		
	Merge pull request #266 from zulip/window-focus-fix
🎉 Focus webview contents on Window focus #216 #251
This commit is contained in:
		@@ -109,8 +109,11 @@ 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
 | 
				
			||||||
		// temporary fix 
 | 
							const webContents = this.$el.getWebContents();
 | 
				
			||||||
		this.$el.focus();		
 | 
							if (webContents && !webContents.isFocused()) {
 | 
				
			||||||
 | 
								this.$el.focus();
 | 
				
			||||||
 | 
								webContents.focus();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	hide() {
 | 
						hide() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user