1

i'm using the autocomplete plugin from JQuery. When typing, the menu with the suggestions will be shown. If the mouse cursor hovers over the menu, in firefox the menuitem will be selected WITHOUT moving the mouse. In IE and Chrome you have to move the mouse first.

I found out, that the reason is a different behaviour of the mouseenter event in Firefox and other browsers. In Firefox Jquery triggers the event, as soon an element will be shown. In other browsers you have to move the cursor first.

To demonstrate this behaviour i created a fiddle. Click on run and move the mouse into the upper part of the result window. After 5 seconds a div will be shown. In Firefox there will be an alert triggered by the mouseenter event. In other Browsers (IE, Chrome) you have to move the mouse first.

http://jsfiddle.net/sbnqq/5/

I'm aware of possible workarounds in own code ( jQuery how to prevent mouseenter triggering when page loads with cursor hovering element ), but the problems lies in the Jquery.ui.autocomplete plugin.

Are there any ideas for a global workaround to tell Jquery to trigger the mouseenter event after mouseover?

regards Andreas

Community
  • 1
  • 1
Andreas
  • 1,183
  • 1
  • 11
  • 24

0 Answers0