Bug Tracker

Ticket #6667 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

submit event doesn't delegate in IE* under certain conditions

Reported by: salomvary Owned by: dmethvin
Priority: undecided Milestone: 1.7
Component: event Version: 1.4.2
Keywords: submit delegate live ie Cc:
Blocking: Blocked by:

Description

If 'click' was delegated to the same context element, delegated 'submit' event handler will never be called.

All IE versions (IE6, IE7, IE8) are affected.

Example:

var first = 'body'; var second = 'body'; jQuery(first).delegate('foobar','click', jQuery.noop); jQuery(second).delegate('form','submit', function(){

alert('submit'); return false;

});

'body'/'body': broken

'body'/'html': works

document/document: broken

document/'body': works

..and so on

Attachments

testcase.html Download (434 bytes) - added by salomvary 4 years ago.

Change History

Changed 4 years ago by salomvary

comment:1 Changed 4 years ago by dmethvin

  • Priority set to undecided
  • Status changed from new to open
  • Milestone changed from 1.4.3 to 1.4.5

 http://jsfiddle.net/dmethvin/2NXAj/

For IE8, appears to have been broken in 1.4.2, fixed in 1.4.3 and broken again in 1.4.4.

comment:2 Changed 3 years ago by dmethvin

I do not see a failure with 1.6.3 but will keep this open and retest with 1.7.

comment:3 Changed 3 years ago by dmethvin

  • Owner set to dmethvin
  • Status changed from open to assigned
  • Milestone changed from 1.next to 1.7

comment:4 follow-up: ↓ 5 Changed 3 years ago by dmethvin

  • Status changed from assigned to closed
  • Resolution set to fixed

I rechecked with the 1.7 event code and this works now.

 https://github.com/jquery/jquery/commit/a4cdbf09ee97471ec041d83ceb8f3feb9825b2a1

comment:5 in reply to: ↑ 4 Changed 3 years ago by Landgraf_Paul

Replying to dmethvin:

I rechecked with the 1.7 event code and this works now.

 https://github.com/jquery/jquery/commit/a4cdbf09ee97471ec041d83ceb8f3feb9825b2a1

No works for me. Tested under internet Explorer 9.

comment:6 Changed 3 years ago by dmethvin

The test case in comment 1 continues to work for me, tested in IE7 and IE9. Please open a new ticket with a test case.

Note: See TracTickets for help on using tickets.