Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: event.stopPropagation is not a function in 6.0.0 #249

Open
huajingbucengyuankesao opened this issue Jun 16, 2023 · 3 comments
Open

Comments

@huajingbucengyuankesao
Copy link

TypeError: event.stopPropagation is not a function

When I was integrating the react-contexify plugin and running my project, the error "TypeError: event.stopPropagation is not a function" appeared when I right-click. I am using version 6.0.0

@vedant-shah
Copy link

me too

@goktugacik
Copy link

Working version:

 const { show } = useContextMenu({
    id: 'card_context_menu'
  })
  
   <Col xl='3' md='4' sm='6'  onClick={show}></Col>
   <Menu id='card_context_menu'>
            <Item onClick={() => handleCopy(request)}>{intl.formatMessage({ id: 'copy' })}</Item>
      </Menu>

TypeError: event.stopPropagation is not a function

  const { show } = useContextMenu({
    id: 'card_context_menu'
  })

  function displayMenu(e) {
    show({
      event: e
    })
  }
  
     <Col xl='3' md='4' sm='6'  onClick={displayMenu}></Col>
   <Menu id='card_context_menu'>
            <Item onClick={() => handleCopy(request)}>{intl.formatMessage({ id: 'copy' })}</Item>
      </Menu>

e Object in displayMenu is a SyntheticBaseEvent 

@hsbtr
Copy link

hsbtr commented Nov 14, 2023

The parameter event of the show function requires a domevent. The domevent of some events does not exist stopPropagation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants