<p dir="auto">Hi,</p>
<p dir="auto">I have a simple IconMenu which is not controlled. Once the menu is displayed and any MenuItem is clicked, the menu closes as expected. However clicking anywhere after this logs the error -</p>
<p dir="auto"><code class="notranslate">Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the IconMenu component.</code></p>
<p dir="auto">The call-stack is -</p>
<p dir="auto">warning @   bundle.js:2198<br>
getInternalInstanceReadyForUpdate   @   bundle.js:5913<br>
ReactUpdateQueue.enqueueSetState    @   bundle.js:6060<br>
ReactComponent.setState @   bundle.js:15918<br>
close   @   bundle.js:54613<br>
requestClose    @   bundle.js:42206<br>
componentClickAway  @   bundle.js:42210<br>
onClickAway @   bundle.js:42509</p>
<p dir="auto">And a bigger issue is that the error count per click keeps increasing on every subsequent menu show/dismiss cycle. E.g. during the very first occurrence, only one error is reported per click. The next time I click on the icon to show the menu and then dismiss it by selecting some item, <strong>two</strong> errors are reported per click. This would happen if the menu is not cleaning up events correctly and would eventually lead to leaks.</p>
<p dir="auto">This is a new regression only observed in 0.14.2, downgrading to 0.14.1 removes warning.</p>
<p dir="auto">On umounting any IconMenu component, I receive the following warning and stacktrace that is entirely within Material UI:</p>
<p dir="auto">Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the IconMenu</p>
<p dir="auto">component.warning @ warning.js:45<br>
getInternalInstanceReadyForUpdate @ ReactUpdateQueue.js:34<br>
ReactUpdateQueue.enqueueSetState @ ReactUpdateQueue.js:181<br>
ReactComponent.setState @ ReactComponent.js:65<br>
close @ icon-menu.js:174<br>
requestClose @ popover.js:207<br>
componentClickAway @ popover.js:211<br>
onClickAway @ render-to-layer.js:99</p>
<p dir="auto">Clicking anywhere at all triggers the warning again, as if the popover was still active.</p>