I am implementing jquery autocomplete to show a list of products in a drop down and be able to search on it. In IE, when a user starts autofill and scrolls down to a su开发者_运维问答ggestion and prett "Enter" key, it just select the item and focus remains on the search box.
In mozilla, when user scrolls down on auto fill and presses enter key, it performs a submit and search occurs automatically.
How can I stop that in Firefox?
You may try to fix this by finding and editing a place in a plugin code which handles keypresses. That would look something like this:
someinput.keypress(function (event) {
var code = event.keyCode;
// handling of pressing the enter key
if (code == 13) {
// preventing form submit
event.preventDefault();
}
And let me advertise a bit my own multiselect plugin http://code.google.com/p/fpsfbmselect/
精彩评论