Skip to main content

Search and Top Navigation

#15238 open bug ()

Opened September 13, 2017 10:20AM UTC

Last modified September 13, 2017 08:04PM UTC

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

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.

Attachments (0)
Change History (5)

Changed September 13, 2017 10:23AM UTC by mariotherealone comment:1

description: 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 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. \ 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. \

Changed September 13, 2017 11:28AM UTC by scottgonzalez comment:2

owner: → mariotherealone
status: newpending

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

Changed September 13, 2017 01:27PM UTC by mariotherealone comment:3

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

Changed September 13, 2017 01:44PM UTC by scottgonzalez comment:4

status: newopen

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

Changed September 13, 2017 08:04PM UTC by rjollos comment:5

description: 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. \ 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 \ {{{#!js \ $( "#tags" ).autocomplete("search"); \ }}} \ with \ {{{#!js \ $( "#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. \