Solved

Jquery stop auto compleate after list scrolls

Posted on 2014-02-24
3
402 Views
Last Modified: 2014-04-04
Hello. I have a jQuery script that auto fills a text box based on an array in a variable.
It seems to work until you have to scroll and select a state that is down below Iowa.
Try to select Texas or a state in that are of the list.
Here is my Forked jsFiddler URL: http://jsfiddle.net/kz2yg/
0
Comment
Question by:semfreak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Murfur earned 500 total points
ID: 39883190
Try a different browser to confirm but are you using Firefox by any chance? And do you have the Firebug extension installed? I ask because have found recently that jQuery functionality goes more than a little nuts if Firebug is installed and you end up chasing ghosts.

I don't see the problem in Safari or Chrome at all, and Firefox does work if I start with Firebug disabled otherwise I see these errors in the Firebug console:

jquery-ui.js (line 146)
TypeError: $.curCSS is not a function
size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;

jquery-2.1.0.js (line 1429)
Error: Syntax error, unrecognized expression: unsupported pseudo: textEquals
throw new Error( "Syntax error, unrecognized expression: " + msg );
0
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 39883226
Take your focus: function out.

After you select an item the mouse is hovering over the list for a brief time and the focus is picking up the item that is in that mouse position when the list is at the beginning.

If you click say Utah on the extreme left edge of the lable and immediately move your mouse left you should be able to get Utah to stick.

Remove the focus: function and the problem goes away.
0
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 39883250
Actually just remove the  following line from focus

$(this).blur();

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question