click not firing mouseover event
See original GitHub issueCurrent behavior:
I trigger some react-contextify menu with .trigger('contextmenu')
My menu is displaying OK
Then I select the div element where an onClick event is attached.
cy.get('.react-contexify__item').debug().click();
I tried to use also “force: true” as an option.
But my action is not triggered. Nothing happens.
With debug() option activated, I trigger manually the click() event and my Material UI dialog is displayed.
------------------------ Debug Info ------------------------
cypress_runner.js:63678 Command Name: get
cypress_runner.js:63678 Command Args: [".react-contexify__item"]
cypress_runner.js:63678 Current Subject: jQuery.fn.init [div.react-contexify__item, prevObject: jQuery.fn.init(1), context: document, selector: ".react-contexify__item"]
subject.click()
MegaTrendPage.jsx:316 hello!
jQuery.fn.init [div.react-contexify__item, prevObject: jQuery.fn.init(1), context: document, selector: ".react-contexify__item"]
Source for div menu is like this:
return (
<div
className={cssClasses}
style={style}
onClick={this.handleClick}
role="presentation"
>
<div className={styles.itemContent}>{children}</div>
</div>
);
Desired behavior:
I trigger click event and dialog is shown…
Versions
Cypress Version used : 3.1.3 Chrome 70.0.3538.110 React 16.6.3 react-contexify : 3.0.3
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
mouseover event is not firing on element on which written
I found the solution. I used mouseenter event instead of mouseover and it worked.
Read more >Mouseover event not firing correctly - jquery - Stack Overflow
I am trying to display a tool-tip alert from a mouse over event on a button. however, what ...
Read more >Element: mouseover event - Web APIs | MDN
The mouseover event is fired at an Element when a pointing device (such as a mouse or trackpad) is used to move the...
Read more >How to trigger onClick from HTML button's mouseOver event
Hook the onmouseover event of the button by attaching the change() function to it. · From the change() method, get reference to the...
Read more >Moving the mouse: mouseover/out, mouseenter/leave
The mouseover event occurs when a mouse pointer comes over an element, and mouseout – when it leaves. These events are special, because...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jkeruzec I was able to reproduce, thank you. We are aware of this issue because we do not yet send mouseover/pointerover events during a click.
We’ll have a fix in either 3.1.3 or 4.0
in the meantime, you can do this:
Released in
3.5.0
.