Skip to content

onClick() not working in popup #36

@Shooshte

Description

@Shooshte

This is my component:

import React, {Component} from 'react'
import PopoutWindow from 'react-popout'

class Help extends Component {
  render() {
    return (
      <PopoutWindow
        onClosing={this.props.closeHelpWindow}
        options={{width: '500px', height: '500px'}}
        ref={el => this._popup = el}
        >
      <div>
        
      // Other HTML content

      <div onClick={console.log('click')}>CLICK</div>

      <button onClick={() => {
        console.log('CLICK')
        this.props.closeHelpWindow
        this._popup.closeWindow
      }}>
        Ok
      </button>
    </div>
    </PopoutWindow>
    )
  }
}

export default Help

When I click the DIV or the button, nothing gets logged to the console (i used inspect on the popup window).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions