Skip to main content

Bug Tracker

Side navigation

#7937 closed bug (invalid)

Opened January 10, 2011 09:20AM UTC

Closed January 10, 2011 12:56PM UTC

Last modified March 10, 2012 12:40PM UTC

About the event change for the textbox

Reported by: anonymous Owned by:
Priority: undecided Milestone:
Component: event Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

Hello everyone here in JQuery:

I notice that if I bind the event for textbox in pure html codes, something like this:

$(function(){

$("#textbox1").change(function(){alert("OK!")});

})

【suppose textbox1 is the id of the textbox in pure HTML form】

I notice that the alert messagebox won't be popuped during I finish changing the value of textbox until i click some other places or raise another event... don't know why?

Attachments (0)
Change History (1)

Changed January 10, 2011 12:56PM UTC by jitter comment:1

component: unfiledevent
milestone: 1.next
resolution: → invalid
status: newclosed
type: enhancementbug

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

This isn't a bug but the behavior as specified by the W3C

The change event occurs when a control loses the input focus and its value has been modified since gaining focus. This event is valid for INPUT, SELECT, and TEXTAREA. element.

Typing in the textarea (obviously) doesn't cause a focus lose while clicking outside of the textarea (or similar actions) remove the focus from the textarea and trigger the change event (if appropriate).

If you want to trigger some behavior while the user types you are better advised to look into the keyXXX-events but as the jQuery bug tracker is not meant for support requests please use the jQuery Forum if you need further help on this one or log onto the #jquery IRC channel on freenode.