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

When closeOnDocumentClick is specified, popup will not be closed by tap operation.

Open uk-taniyama opened this issue 3 years ago • 1 comments

Version

2.0.5

Test Case

https://codesandbox.io/embed/reactjs-popup-issue-template-forked-qt0wv

Android Chrome or Simulate mobile devices with Device Mode - Chrome

Expected Behavior

  1. Tap the button. then open [popup content].
  2. Tap outside of [popup content]. then close [popup content].

Actual Behavior

  1. Tap the button. then open [popup content].
  2. Tap outside of [popup content]. then close [popup content].

However, the [popup content] opens immediately.

uk-taniyama avatar Dec 11 '21 12:12 uk-taniyama

Your open state is set to true by default. Set it to false and it will not open immediately, only on button click.

const [open, setOpen] = useState(false);
//                               ^^^^^ This was set to 'true' before

benomatis avatar Nov 03 '23 10:11 benomatis