Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#5971 closed bug (notabug)

When scrollling through autocomplete suggestions using up/down arrow keys, highlighted text is copied to the input element, which may make it appear that a selection has been made

Reported by: ryounes Owned by:
Priority: minor Milestone:
Component: ui.autocomplete Version: 1.8.2
Keywords: autocomplete, scroll, arrow key, selection Cc:
Blocked by: Blocking:

Description

This can be tested on the jQuery UI autocomplete demo pages: when scrolling through the list of autocomplete suggestions using up/down arrow keys, the highlighted text is copied to the input element. This does not happen when hovering over a suggestion with the mouse. I have seen it confuse a user into thinking that a selection has been made, although the select event is not actually fired until the user either presses the enter key or clicks on the item with the mouse. I have checked out other autocomplete widgets and have not seen this behavior.

Change History (3)

comment:1 Changed 9 years ago by Scott González

Resolution: invalid
Status: newclosed

This is by design. This is exactly how Firefox's location bar work, which is the model that we're following.

comment:2 Changed 9 years ago by danheberden

A quick note, this behavior can easily be disabled by halting the focus event.

e.g.

jQuery('#element').autocomplete({
       focus: function(event, ui) {
            event.preventDefault(); // or return false;
       }
});

comment:3 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.