reactjs-popup icon indicating copy to clipboard operation
reactjs-popup copied to clipboard

Do not close modal on mouse up outside the modal when mouse down is inside

Open Crustan opened this issue 3 years ago • 3 comments

I just discovered a potential regression, cause the bug reported in issue 174 still occurs in the latest version.

When selecting text in a popup and having mouse-up event occur outside of the popup, the popup is closed.

Version

2.0.4

Test Case

To reproduce:

  • Open https://react-popup.elazizi.com/home/
  • Open the demo popup by clicking the button "Open modal"
  • Select all text inside the popup, and make sure that your mouse is outside of the popup when you let the pressed mouse button go.
  • Now, the popup closes, whilst I would like it to stay open.

Expected Behavior

When selecting text in a popup and having mouse-up event occur outside of the popup, the popup should not be closed.

Actual Behavior

When selecting text in a popup and having mouse-up event occur outside of the popup, the popup is closed.

Crustan avatar May 19 '21 09:05 Crustan

Have the same issue here. Were you able to find a fix for this @Crustan?

RanoVeder avatar Jul 18 '21 14:07 RanoVeder

Any Updates ?

snairsumith avatar Jul 26 '21 07:07 snairsumith

Have the same issue here. Were you able to find a fix for this @Crustan?

We applied the custom hook solution mentioned in issue 174 as a temporary fix.

Crustan avatar Jul 28 '21 11:07 Crustan