Skip to main content

Bug Tracker

Side navigation

#6051 closed bug (duplicate)

Opened February 08, 2010 06:03AM UTC

Closed February 08, 2010 02:07PM UTC

'.bind' binds change event only after first change

Reported by: ben.mcintyre Owned by:
Priority: Milestone: 1.4.2
Component: event Version: 1.4.1
Keywords: Cc:
Blocked by: Blocking:
Description

Code below is more or less from your sample. I'm trying to bind all the input controls to a change event.

This works in 1.3, but in 1.4 the controls can be changed once without triggering a change event, then re-entering the control and changing text a second time triggers the change event.

Weird.

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<style>

textarea { height:25px; }

</style>

<script src="js/jquery.min.js"></script>

</head>

<body>

<form>

<input type="button" value="Input Button"/>

<input type="checkbox" />

<input type="file" />

<input type="hidden" />

<input type="image" />

<input type="password" />

<input type="radio" />

<input type="reset" />

<input type="submit" />

<input id="tb" type="text" />

<select><option>Option</option></select>

<textarea></textarea>

<button>Button</button>

<a href="javascript:printb()">test</a>

</form>

<div id="messages">

</div>

<script type="text/javascript">

$(document).ready(function() {

$(":input").bind("change", function() { alert('hi 123'); });

});

</script>

</body>

</html>

Attachments (0)
Change History (1)

Changed February 08, 2010 02:07PM UTC by john comment:1

component: traversingevent
resolution: → duplicate
status: newclosed

Duplicate of #5851.