Bug Tracker

Modify

Ticket #9855 (closed bug: cantfix)

Opened 2 years ago

Last modified 2 years ago

html(data) function, where the data contains the "onchange" - attribute doesn't attach the onchange event in IE 9

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: manipulation Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

$(document).ready(function () { $('#div').append('<div>No Event:</div><select onchange="window.alert(' + "'changed'" + ');"><option>Change event not attached</option><option>and not fired in IE 9</option></select>')

});

<div id="div"></div>

(works fine in FF, Safari)

Change History

comment:1 Changed 2 years ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to cantfix
  • Status changed from new to closed
  • Component changed from unfiled to manipulation

comment:2 Changed 2 years ago by dmethvin

Just to follow up, the reason we can't fix this is because IE does not correctly handle the change event. When you attach this event via a jQuery handler via .bind, .live, or .delegate we make heroic efforts to simulate its behavior. We can't do that for inline handlers. In general, inline handlers are bad practice and we do not recommend using them.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.