We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a16949b commit 06c1c04Copy full SHA for 06c1c04
src/components/ModalPortal.js
@@ -300,13 +300,12 @@ export default class ModalPortal extends Component {
300
this.shouldClose = null;
301
};
302
303
- handleOverlayRightClick = (event) => {
304
- if (this.shouldClose === null) this.shouldClose = true;
305
- else if (!this.shouldClose) this.shouldClose = null;
306
- if (this.shouldClose) {
307
- event.preventDefault();
308
- this.props.onOverlayRightClick(event);
309
- }
+ handleOverlayRightClick = event => {
+ if(event.target == this.overlay)
+ {
+ event.preventDefault();
+ this.props.onOverlayRightClick(event);
+ }
310
311
312
handleContentOnMouseUp = () => {
0 commit comments