everweij / react-laag

Hooks to build things like tooltips, dropdown menu's and popovers in React
https://www.react-laag.com
MIT License
907 stars 47 forks source link

[BUG] onOutsideClick doesn't get called when you right-click outside of the trigger with mouse position #70

Open kyeo76 opened 3 years ago

kyeo76 commented 3 years ago

To Reproduce Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/cool-gates-qcd5x?file=/src/App.js:0-66
  2. Right-click on all 3 triggers
  3. All 3 layers are visible

Expected behavior Expected onOutsideClick to be called.

Screen Shot 2021-05-13 at 6 24 23 PM
kyeo76 commented 3 years ago

or maybe it's more semantically right to add onOutsideContextMenu option to useLayer