- Tutorials / JavaScript / Tutorials / Mobile Web Development
- Wednesday, 25th Nov, 2015
Home » Tutorials » JavaScript » jQuery UI Autocomplete Hover Issue Hacks For iOS
Take a look at the demo – jQuery Autocomplete’s User Experience Problem in iOS Devices. (Please view it with your iOS devices)
Let’s consider this:
See? This will cause a very serious User Experience (UX) problem if your users browsing your web app with their iOS devices. In order to solve this strange behavior, here’s what I did:
$("#searchbox").autocomplete({ open: function(event, ui) { $('.ui-autocomplete').off('menufocus hover mouseover mouseenter'); } });
The event handlers – “menufocus“, “hover“, “mouseover“, “mouseenter” that attached with the on() method has been removed from jQuery Autocomplete when the suggestion menu is opened or updated. So, the “hover” event will no longer exist in the Autocomplete!
View Demo – Fixed Version (Please view it with your iOS devices)
Hope it helps!