Fix an error where the main page gets blank when adding a server
This commit is contained in:
@@ -227,9 +227,10 @@ const MattermostView = createReactClass({
|
||||
|
||||
focusOnWebView() {
|
||||
const webview = findDOMNode(this.refs.webview);
|
||||
if (!webview.getWebContents().isFocused()) {
|
||||
const webContents = webview.getWebContents(); // webContents might not be created yet.
|
||||
if (webContents && webContents.isFocused()) {
|
||||
webview.focus();
|
||||
webview.getWebContents().focus();
|
||||
webContents.focus();
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user