Ticket #7024 (closed bug: fixed)
Autocomplete menu options are activated even if mouse is not moved
|Reported by:||lex1982||Owned by:|
When the autocomplete menu opens and the mouse is over one option -- that is just appearing --, this option is activated even if the user does not move the mouse.
While this is usually not a severe bug when the user is forced to select one of the autocomplete options, it is pretty annoying when the options are just suggestions and the user may enter an arbitrary text (and for example submit it by pressing ENTER). Then, it happens very often that options are accidently selected because they were automatically activated.
The only solution I found that works in all browsers is not to use the mouseenter event for the menu options but mousemove. It has to be checked in the event handler if the mouse was really moved (mouse coordinates have to be saved each time the menu or a menu option is activated). Since mousemove is fired very often it should be additionally checked if the hovered menu item is already selected to avoid unnecessary activate()-calls.
The bug can be easily reproduced here: http://jqueryui.com/demos/autocomplete/
Just position the mouse below the input and type something.
- Status changed from new to closed
- Resolution set to fixed
- Status changed from closed to reopened
- Resolution fixed deleted