Bug Tracker

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#5800 closed bug (worksforme)

Change events fires in IE8 on clicking in text input box

Reported by: hugo Owned by: brandon
Priority: major Milestone: 1.4.1
Component: event Version: 1.4
Keywords: Cc:
Blocked by: Blocking:

Description

When I bind the change event to text inputs in this manner: $("input").each(function() {

$(this).bind("change", function() {

alert("changed!!");

});

}); Then in IE8 the change event is triggered and the alert box is shown when you click with the mouse some of the boxes. When I bind the change event like this: $("input").bind("change", function() {

alert("changed!!"); }

}); the event is not triggered when clicking in the boxes.

In version 1.3.2 the change event is not triggered.

Attachments (1)

test-jquery-1.4rc1.js.html (936 bytes) - added by hugo 13 years ago.
Test change event

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by hugo

Attachment: test-jquery-1.4rc1.js.html added

Test change event

comment:1 Changed 13 years ago by dmethvin

See also #5823, closed as a duplicate.

comment:2 Changed 13 years ago by hugo

I've tested this bug using jquery 1.4.1.
The situation has changed. Initially the alert is not shown. which is correct. But when I click in for example text box 2, delete the last character, and set focus to for example text box 1, no alert is given. JQuery should display "Changed!!"
When I set focus again to inputbox 2, and again delete a character and move the focus to another inputbox, then the alert is displayed[[BR]] So it seems that the first change to the inputbox is not caught.

comment:3 in reply to:  2 Changed 13 years ago by TigerShark

Replying to hugo:

I've tested this bug using jquery 1.4.1.
The situation has changed. Initially the alert is not shown. which is correct. But when I click in for example text box 2, delete the last character, and set focus to for example text box 1, no alert is given. JQuery should display "Changed!!"
When I set focus again to inputbox 2, and again delete a character and move the focus to another inputbox, then the alert is displayed[[BR]] So it seems that the first change to the inputbox is not caught.

I too am experiencing this behavior in IE8 and jQuery 1.4.1. I am hooking the change event to all textboxes on a page, but the change event is first fired when any textbox receives it's second change.

comment:4 Changed 12 years ago by snover

Resolution: worksforme
Status: newclosed

live test case. Not reproducible with latest jQuery.

Note: See TracTickets for help on using tickets.