React onClick fails on mobile and on mobile phone simulator

  render () {
    let images = JSON.parse(this.props.problemDetails.images).map((item) =>(
      <div className="image-box" key={item.uid} onClick={() =>this.handlePreview(item)}>
        <img src={item.thumbUrl} alt={item.name} />
      </div>
    ))
  }
 handlePreview = (file) => {
    console.log(file)
    this.setState({
      previewImage: file.thumbUrl,
      previewVisible: true,
    });
  }
Mar.23,2021

image-box adds the following css attributes

cursor:'pointer'

reference from: https://stackoverflow.com/que.


Click events need to be passed in the component because the outer layer is react-bscroll,.

Menu