Bug Tracker

Ticket #5800 (closed bug: worksforme)

Opened 5 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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

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

Change History

Changed 5 years ago by hugo

Test change event

comment:1 Changed 5 years ago by dmethvin

See also #5823, closed as a duplicate.

comment:2 follow-up: ↓ 3 Changed 5 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 5 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 4 years ago by snover

  • Status changed from new to closed
  • Resolution set to worksforme

 live test case. Not reproducible with latest jQuery.

Note: See TracTickets for help on using tickets.