Actually, this will break using the mouse to select an autocomplete item. We only update the textbox value for key-triggered selections (in nsAutoCompleteController::HandleKeyNavigation), while the autocomplete popup's click handler just calls nsAutoCompleteController::HandleEnter and depends on this code always getting the selected value.
Comment on attachment 306031
patch as described
Actually, this will break using the mouse to select an autocomplete item. We only update the textbox value for key-triggered selections (in nsAutoCompleteC ontroller: :HandleKeyNavig ation), while the autocomplete popup's click handler just calls nsAutoCompleteC ontroller: :HandleEnter and depends on this code always getting the selected value.