diff --git a/pages/index.js b/pages/index.js index 268a657d0..c0b3fbf17 100644 --- a/pages/index.js +++ b/pages/index.js @@ -6,11 +6,18 @@ class QuestionCard extends React.Component { constructor(...args) { super(...args); this.state = { hidden: true }; + this.handleClick = this.handleClick.bind(this); + } + + handleClick(event) { + if (!window.getSelection || window.getSelection().isCollapsed) { + this.setState({ hidden: !this.state.hidden }); + } } render() { return( -
{ this.setState({ hidden: !this.state.hidden }) }}> +
Q. {this.props.question}