question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"mouseenter" not triggering the "mouseEnter" function of the component

See original GitHub issue

Hi,

I am trying to run a ember acceptance test and started encountering the issue when I tried to execute the command

triggerEvent('#my-tag-1', 'mouseenter')

The component associated with the element has the function

mouseEnter() {
  console.log('mouse entered');
}

When I am running the program in development environment, the event is getting triggered and the console is also getting logged. But when running ember test it fails to trigger the mouseEnter event of the component.

I have double checked that element with id #my-tag-1 exists on DOM while running the tests. But still when triggering the mouseenter event, the component is not capturing it.

my ember version and node version are

ember-cli: 2.9.1
http_parser: 2.7.0
node: 4.5.0
v8: 4.5.103.37
uv: 1.9.1
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 46
openssl: 1.0.2h
os: darwin x64
v4.5.0

This was working fine when I was working with ember#2.4.6 and ember-qunit#1.4.0, but started to break after I upgraded to ember#2.8-lts and ember-qunit#3.0.1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ssurana2commented, Nov 22, 2016

After playing around using Ember.$ and Jquery’s trigger the mouseEnter function of the component is getting executed from the acceptance test, not sure why triggerEvent is not working

0reactions
wagenetcommented, Aug 28, 2017

@tchan that’s essentially how we worked around it. Thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery mouseenter() function not working as expected
What I'm trying to do is "when some hover on the box it will zoom (font-size increases) and when someone clicks on it...
Read more >
.mouseenter() | jQuery API Documentation
The mouseenter event, on the other hand, only triggers its handler when the mouse enters the element it is bound to, not a...
Read more >
Element: mouseenter event - Web APIs | MDN
The mouseenter event is fired at an Element when a pointing device (usually a mouse) is initially moved so that its hotspot is...
Read more >
Moving the mouse: mouseover/out, mouseenter/leave
Events mouseenter/leave are different in that aspect: they only trigger when the mouse comes in and out the element as a whole. Also...
Read more >
mouseenter not working - Codecademy
I am having the same problem. I've gone over my code a dozen times and I am 100% confident that it is correct....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found