stop cursor bug fix from running in inactive tabs (#1054)
This commit is contained in:
parent
593ded98f6
commit
5edc665978
|
@ -145,10 +145,14 @@ export default class MattermostView extends React.Component {
|
||||||
// So this would be emitted again when reloading a webview
|
// So this would be emitted again when reloading a webview
|
||||||
webview.addEventListener('dom-ready', () => {
|
webview.addEventListener('dom-ready', () => {
|
||||||
// webview.openDevTools();
|
// webview.openDevTools();
|
||||||
|
|
||||||
// Remove this once https://github.com/electron/electron/issues/14474 is fixed
|
// Remove this once https://github.com/electron/electron/issues/14474 is fixed
|
||||||
// - fixes missing cursor bug in electron
|
// - fixes missing cursor bug in electron
|
||||||
webview.blur();
|
// - only apply this focus fix if the current view is active
|
||||||
webview.focus();
|
if (this.props.active) {
|
||||||
|
webview.blur();
|
||||||
|
webview.focus();
|
||||||
|
}
|
||||||
if (!this.state.isContextMenuAdded) {
|
if (!this.state.isContextMenuAdded) {
|
||||||
contextMenu.setup(webview, {
|
contextMenu.setup(webview, {
|
||||||
useSpellChecker: this.props.useSpellChecker,
|
useSpellChecker: this.props.useSpellChecker,
|
||||||
|
|
Loading…
Reference in a new issue