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 8255925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:41:43+00:00 2026-06-08T01:41:43+00:00

I have an autocomplete, but when I type text to search and move my

  • 0

I have an autocomplete, but when I type text to search and move my mouse over autocomplete’s results, text in autocomplete changes to previous(removes). Does anyone know how to improve this behaviour.

I read in jQuery.com

focus Type: autocompletefocus

Before focus is moved to an item (not selecting), ui.item refers to
the focused item. The default action of focus is to replace the text
field’s value with the value of the focused item, though only if the
focus event was triggered by a keyboard interaction. Canceling this
event prevents the value from being updated, but does not prevent the
menu item from being focused.

but I don’t know how to cancel focus event.

  • 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-08T01:41:44+00:00Added an answer on June 8, 2026 at 1:41 am

    You’re right, jquery autocpmplete has that bug on they own [demo page][1].
    You can get it if you typed some text and autocomplete had showed some answers; then you adding some additional text and at the same time you are hovering on one of the answer the programm will cut your additional text.
    You can check source code in autocomplete widget

    blur: function (event, ui) {
               // don't set the value of the text field if it's already correct
               // this prevents moving the cursor unnecessarily
               if (self.menu.element.is(":visible") && (self.element.val() !== self.term)){
                   self.element.val(self.term);
               }
           }
    

    And you can figure out you problem by commenting out this line self.element.val(self.term);
    But this is not realy good idea. You can post a bug to jquery!

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

Sidebar

Related Questions

I have read in many places that WPF combo does not support autocomplete but
I'm using 'rails3-jquery-autocomplete' gem, but it doesn't have multi column search, but there is
I have autocomplete text box, that is JQuery based. when i record the macro,
i use this example as a base: http://jqueryui.com/demos/autocomplete/#combobox its cool. But if you type
I have the following set up, a ddl (ddlProd, radBuyer) and autocomplete text box
There's a lot of Text editors which support autocomplete during programming, but I want
I trying to create a auto-complete search script (jQuery + PHP) but I have
I have a Textbox with the id text (#text) with has an autocomplete like
I have a text box with autocomplete set and working perfectly fine. However when
I have a jQuery autocomplete that works fine making the suggestions but when I

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.