precise-ui icon indicating copy to clipboard operation
precise-ui copied to clipboard

OverflowMenu onBlur causes unmounted state update

Open michaelx opened this issue 5 years ago • 0 comments

Bug Report

Prerequisites

  • [x] Can you reproduce the problem in a MWE?
  • [x] Are you running the latest version?
  • [x] Did you check the FAQs to see if that helps you?
  • [x] Are you reporting to the correct repository?
  • [x] Did you perform a search in the issues?

For more information, see the CONTRIBUTING guide.

Versions

precise-ui: 1.2.0 node: 12.13.1 npm: 6.12.1

Description

Double clicking the trigger icon of the menu throws:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

See also attachment at the end.

Steps to Reproduce

  1. npm start
  2. Go to OverflowMenu component
  3. Click on the icon one time
  4. Click on the icon again
  5. Error will come up

Expected behavior: No error Environment details: macOS 10.15.4, all browsers

Possible Solution

Removing onBlur will resolve it. Is it needed? Outside click and list selection will also close it.


OverflowMenu-memory-leak

michaelx avatar Apr 22 '20 15:04 michaelx