summaryrefslogtreecommitdiffstats
path: root/webapp/components/toggle_modal_button.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/toggle_modal_button.jsx')
-rw-r--r--webapp/components/toggle_modal_button.jsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/webapp/components/toggle_modal_button.jsx b/webapp/components/toggle_modal_button.jsx
index de225493c..69bdbbda0 100644
--- a/webapp/components/toggle_modal_button.jsx
+++ b/webapp/components/toggle_modal_button.jsx
@@ -15,7 +15,8 @@ export default class ModalToggleButton extends React.Component {
};
}
- show() {
+ show(e) {
+ e.preventDefault();
this.setState({show: true});
}
@@ -29,10 +30,10 @@ export default class ModalToggleButton extends React.Component {
// allow callers to provide an onClick which will be called before the modal is shown
let clickHandler = this.show;
if (onClick) {
- clickHandler = () => {
+ clickHandler = (e) => {
onClick();
- this.show();
+ this.show(e);
};
}