From 79218164cd92271740d9b211eb5429645957ec4c Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 1 Oct 2018 23:13:48 -0700 Subject: [PATCH] Fixed bug #833: Eliminated full re-renders of app when mousing over popup due to interaction between setState and getChildContext. --- src/web/RootView.tsx | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/web/RootView.tsx b/src/web/RootView.tsx index e588d3b6..932b93fe 100644 --- a/src/web/RootView.tsx +++ b/src/web/RootView.tsx @@ -62,9 +62,6 @@ export interface RootViewState { constrainedPopupWidth: number; constrainedPopupHeight: number; - // Are we currently hovering over the popup? - isMouseInPopup: boolean; - // Assign css focus class if focus is due to Keyboard or mouse focusClass: string|undefined; } @@ -138,7 +135,6 @@ export class RootView extends React.Component { popupHeight: 0, constrainedPopupWidth: 0, constrainedPopupHeight: 0, - isMouseInPopup: false, focusClass: this.props.mouseFocusOutline }; } @@ -161,10 +157,6 @@ export class RootView extends React.Component { this._startRepositionPopupTimer(); } - if (!this.state.isMouseInPopup) { - this._startHidePopupTimer(); - } - if (!this._clickHandlerInstalled) { document.addEventListener('mousedown', this._tryClosePopup); document.addEventListener('touchstart', this._tryClosePopup); @@ -186,10 +178,6 @@ export class RootView extends React.Component { this._recalcPosition(); } - if (!this.state.isMouseInPopup) { - this._startHidePopupTimer(); - } - if (this.props.activePopup) { this._startRepositionPopupTimer(); } @@ -510,18 +498,10 @@ export class RootView extends React.Component { } private _onMouseEnter(e: React.MouseEvent) { - this.setState({ - isMouseInPopup: true - }); - this._stopHidePopupTimer(); } private _onMouseLeave(e: React.MouseEvent) { - this.setState({ - isMouseInPopup: false - }); - this._startHidePopupTimer(); }