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

  • Home
  • SEARCH
  • 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 8346759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:07:21+00:00 2026-06-09T07:07:21+00:00

So I just decided to throw in an <input type=search> element on a page,

  • 0

So I just decided to throw in an <input type="search"> element on a page, and I see Chrome renders a nice little X icon that I can click on to clear the value. It looks like this icon can trigger the change event, but only when the input content has changed since the last blur.

Say I am handling keyup events to automatically render results as a user types. As they type, results are filtered (automatically firing some ajax during each keyup event). Then, when the user stops and clicks the X icon, I want to revert back to showing all results.

I can’t seem to figure out how to handle this scenario. When the user starts with an empty box, they give it focus and start typing. However when they stop and click chrome’s X button, keyup is not fired (duh). Furthermore, when they blur, the change event is not fired because the search input is in the same state as it was when it first received focus.

Are there any other events fired when someone clicks this little X icon? Do I have to handle click as well as keyup, or is there something more specific?

  • 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-09T07:07:23+00:00Added an answer on June 9, 2026 at 7:07 am

    You’re probably looking for the onsearch event which is fired whenever the user searches or the search text is removed by pressing the x

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

Sidebar

Related Questions

Update: Last night, I decided that this is just too much work to change
Yes, I understand that JavaScript doesn't have classes per se, so I'll just throw
I'm just getting started with the MVVM pattern in WPF and I decided that
I just decided to replace phpMyAdmin by Mysql Query Browser ( finally I can
We've just decided to purchase Google Apps for Business for a couple of users
I was making a simple class for a small project and decided to just
Just starting with js, decided to convert Friendfeed to a fluid app, and as
I just started out with a new site and I decided to use DOMImplementation
Just checking my JS and I have an error, but I cannot see where.
Thanks for the input on this question , I've decided to go with making

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.