react-modal icon indicating copy to clipboard operation
react-modal copied to clipboard

[added] Overlay right click is handled like a regular click

Open galabra opened this issue 2 years ago • 1 comments

Fixes #837.

Changes proposed: Added handling of right clicks on the modal's overlay, so it uses the exact same functionality of the regular overlay click.

Acceptance Checklist:

  • [ ] The commit message follows the guidelines in CONTRIBUTING.md.
  • [ ] Documentation (README.md) and examples have been updated as needed.
  • [ ] If this is a code change, a spec testing the functionality has been added.
  • [ ] If the commit message has [changed] or [removed], there is an upgrade path above.

galabra avatar Sep 10 '21 11:09 galabra

@galabra I don't know if we should make this a default behavior for the right click. Maybe expose the handler would be better in this case...

<modal 
  onRequestClose={requestClose}
  onOverlayRightClick={requestClose} 
/>

diasbruno avatar Sep 10 '21 13:09 diasbruno