7

Check this fiddle out: http://jsfiddle.net/abitdodgy/7rFb6/1/

When you move the cursor fast the mouseleave event does not register at times. Why is this happening?

When you hover over a selected image, a .controls layer appears that allows you to remove the selection. Once you unhover, though, the .controls layer should disappear. This does not always happen if you move the cursor really fast between the layers.

Try selecting the images and move the cursor very quickly between them and you will notice that this is happening. If the image is selected, the layer .controls should not be visible unless you are hovering over it.

Any ideas?

dee
  • 1,848
  • 1
  • 22
  • 34

2 Answers2

2

Try to bind the mouseleave event to the wrapper div and not to the single element, since it's not hovered on .controls show() trigger.

Is this sample working for you?

I suggest to add z-index: 2; to the .controls elements, as well.

AlexBay
  • 1,323
  • 2
  • 14
  • 26
1

I RAPIDLY as hell moved my laser mouse over all of them and they INSTANTLY responded. Seems the issue is related to the limitations of your hardware rather than some specific issue with the software I'm sorry to say.

Phillip Berger
  • 2,317
  • 1
  • 11
  • 30
  • Are you sure? Check this out: http://stackoverflow.com/questions/7331731/jquery-mouseleave-not-fired-on-container-when-moving-cursor-fast - It seems like I'm not the only one, although this does not explain why. I'm using MacBook Pro Retina, and it's happening on Chrome and Safari. – dee Mar 05 '13 at 05:47
  • OK just to be sure I tested it in Firefox 19.0, Google Chrome 25.0.1364.152 and Safari 6.0.2 (8536.26.17) on both your and the other person's fiddle and couldn't reproduce the issue. – Phillip Berger Mar 05 '13 at 05:50
  • That's weird. I can recreate the other guys issue as well. Hmm... OK. Thanks. I'm going to let this float for a while before deciding! See if anyone else can have some input. – dee Mar 05 '13 at 05:54
  • There may very well be a problem but on my ~4 year oldish iMac I'm not seeing. As I said, I'm not using a Mac Mouse I have a logitech "high performance laser mouse" in case that matters. – Phillip Berger Mar 05 '13 at 05:56