Comments (5)
Sorry, I'm not getting it completely - can you elaborate a bit?
from jquery-autocomplete.
Here you can reproduce a bug. Just click mouse on field to give it focus and select any suggestion in dropdown menu. Dropdown menu will disappear and appear again. Because in your code autocomplete field gets a focus after selecting and then browser makes a request again (cache is false).
My suggestion is add the flag which will set the behavior: return a focus to the field or not after selecting.
if (o.returnFocus) that.focus();
Or maybe suggest a better solution.
from jquery-autocomplete.
Okay, I've just committed an update, but it won't completely fix the issue. Your use case is really a special scenario.
The problem is, "focus" is necessary for using scroll bars in the dropdown suggestions box in Internet Explorer (<= 10). With the updated code, focus is only triggered when actually required to keep the scroll bars working. I believe that's a pretty good compromise, because those IE versions are fortunately fading away slowly.
In the meantime, you could prep your source function in order to prevent double requests or you could patch the plugin code on your own.
If the solution is working for you, I'd close the issue.
from jquery-autocomplete.
Nay, I see that doesn't really fix the issue for you. I'll try something else ...
from jquery-autocomplete.
I'm afraid I'm turning in circles here. In the end, the dropdown box should close when the input field looses focus. However, depending on the browser, the field also looses focus (unwanted) when controlling scroll bars by mouse inside the suggestions. That was actually an issue once:
#12
In order to close the suggestions box without using the blur event, it may be possible to catch events such as pressing tab, shift+tab, hotkeys, click outside the box, etc. Yet, my guess is, that this involves quite an amount of extra code ... If you have an idea, let me know please.
from jquery-autocomplete.
Related Issues (20)
- Turkish language support
- onSelect option/function HOT 1
- Add public method "run" auto suggest when you want !
- After setting 'setSource', list is showing new and old items.
- IE7 Positioning Issue & Fix
- [Q] Alias for options HOT 1
- OnSelect not trigerig HOT 1
- is there an example for a working demo with json?
- Browser support for autocomplete='off' has changed. HOT 1
- key enter is intercepted
- show up suggestion again when user type 'space' and more
- How to Trigger Search by Other Element (like button) HOT 2
- Positioning on the pages with Wordpress admin bar (and fix for it)
- array data not processing HOT 1
- Any ideas how to add spinner when search is in progress? HOT 2
- Including the angular element like ng-click on the dropdown
- Force the user to select value from the drop down list HOT 1
- Masked characters shown in the textbox. HOT 1
- 2 auto completes on same page
- Option to set auto or min/max width on returned suggestions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-autocomplete.