Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8354195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:28:51+00:00 2026-06-09T09:28:51+00:00

When navigating to an autocomplete option with the keyboard and hitting [enter], other browsers

  • 0

When navigating to an autocomplete option with the keyboard and hitting [enter], other browsers (ex: Firefox 14.0.1) fire this event, but chrome (21.0.1180.60 m) does not. I’m using jquery to hook the event:

    $('input').keydown(function (event) {
        if (event.which == 13) {
            var $txt = $(this);
            //settimeout req. for firefox to append autocomplete
            setTimeout(function () {
                //**chrome doesn't get here until you hit enter a second time
            }, 0);

        }
   });​

Example here:
http://jsfiddle.net/a9vbe/4/

Anybody know what’s going on here or what a possible solution might be? Using the keyup event instead would ‘fix’ the issue, because computers are faster than fingers, but I would rather not do that. Keydown (or Keypress) are preferable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:28:53+00:00Added an answer on June 9, 2026 at 9:28 am

    Nothing wrong with doing keyup in an instance like this, especially since it fixes the issue. The problem is the data-list doesn’t populate the textbox fast enough for the keydown event to fire off the event on the input. At that point you are still focused within the datalist itself. This is a prime example of one of the benefits of keyup.

    Not to mention it will fire off autocomplete once the user releases a key, so you don’t have it firing 1000x because someone holds down the ‘F’ key for no reason.

    In ajax / autocomplete situations like this I always use “keyup”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have page control but not navigating to other view. so please provide the
I use jquery autocomplete in my application but I am not satisfied on how
I use this snippet to prevent the user from accidentally navigating away from the
WinForms databinding has very solid support for navigating related DataTables via DataRelation objects, but
Is it possible in the handler of the Navigating event to change the Uri
In Linux, and many other systems, when navigating the terminal you can press Tab
I'm navigating with the keyboard, and I can't find visually which element has the
While keyboard navigating a WPF app, in one step, between one control and another,
According to this page navigating between highlighted usages: (source: jetbrains.com ) can be done
I need a little bit of help navigating through this object: {COLUMNS:[ID,TYPE,NAME],DATA:[[1,Image,My Image],[2,Text,My Text],[3,Video,My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.