Opened 18 months ago

Last modified 18 months ago

#15238 open bug

Autocomplete option not selected when input is not focused

Reported by: mariotherealone Owned by: mariotherealone
Priority: minor Milestone: none
Component: ui.autocomplete Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Ryan J Ollos)

Affected: 1.12.0, 1.12.1

Whenever you

  • try to click on a suggestion
  • and the main autocomplete input field doesn't have focus
  • and the main autocomplete input field is outside of window area

then it does focus on this input field instead of selecting a value. When the field is already focused it works ok.

input can be not focused when you try to trigger autocomplete suggestions manually by calling

autoComplete.autocomplete("search");

https://jsfiddle.net/Lm7xqs37/3/

How to reproduce a bug:

  1. Do not make a focus on input
  2. Click "Search" button
  3. Select the very last position from suggestion. If you have very big screen try to use CTRL + to make it bigger so the input field is outside of the window area

Works ok with 1.11.4

For now I'm fixing it just by restoring a focus after a click

Replace

$( "#tags" ).autocomplete("search");

with

$( "#tags" ).autocomplete("search").focus();

and it works again

Mario

p.s.

My last bug report was a duplication. Sorry about that. I couldn't find bug related with this as well, so sorry if this is another duplication.

Change History (5)

comment:1 Changed 18 months ago by mariotherealone

Description: modified (diff)

comment:2 Changed 18 months ago by Scott González

Owner: set to mariotherealone
Status: newpending

This is working fine for me. Are you experiencing this problem in only one specific browser?

comment:3 Changed 18 months ago by mariotherealone

Status: pendingnew

I just checked few browsers.

It happens on

Chrome Version 61.0.3163.79 (Official Build) (64-bit) Firefox 55.0.3 (32-bit) IE 11.540.15063.0 (11.0.45 (KB4034733)

OS: Windows 10 Home

I checked it as well on my firend's PC (at work) and it happens as well (js fiddle) for him

Make sure pls that all points are covered

  • main autocomplete input field doesn't have focus. if you have a focus click outside to loose it.
  • click "search" button. suggestion list will pop in. Do not select anything yet.
  • scroll with suggestions to the very bottom (you don't see main input field anymore)
  • click on the very last suggestion once (you will be scrolled up to the input field but selection will not be made)
  • if you have big screen try to enlarge it with ctrl + to make input going out of the main window (browser window , not this div in jsfiddle) when scrolling

If you can not reproduce that I will try to make a short video what's happening.

Mario

comment:4 Changed 18 months ago by Scott González

Status: newopen

Confirmed. It was the scrolling portion that I was missing.

comment:5 Changed 18 months ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.