stop cursor bug fix from running in inactive tabs (#1054)

This commit is contained in:
Dean Whillier 2019-10-03 09:06:40 -04:00 committed by GitHub
parent 593ded98f6
commit 5edc665978
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,10 +145,14 @@ export default class MattermostView extends React.Component {
// So this would be emitted again when reloading a webview
webview.addEventListener('dom-ready', () => {
// webview.openDevTools();
// Remove this once https://github.com/electron/electron/issues/14474 is fixed
// - fixes missing cursor bug in electron
// - only apply this focus fix if the current view is active
if (this.props.active) {
webview.blur();
webview.focus();
}
if (!this.state.isContextMenuAdded) {
contextMenu.setup(webview, {
useSpellChecker: this.props.useSpellChecker,