Skip to content

Commit

Permalink
Event: Use form prop so that a propHook can be used
Browse files Browse the repository at this point in the history
Fixes gh-2332
Closes gh-2575
  • Loading branch information
adrianolek authored and mgol committed Sep 14, 2015
1 parent 4c3e63b commit ead83b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,12 @@ if ( !support.submit ) {
// Node name check avoids a VML-related crash in IE (#9807)
var elem = e.target,
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ?
elem.form :

// Support: IE <=8
// We use jQuery.prop instead of elem.form
// to allow fixing the IE8 delegated submit issue (gh-2332)
// by 3rd party polyfills/workarounds.
jQuery.prop( elem, "form" ) :
undefined;

if ( form && !jQuery._data( form, "submit" ) ) {
Expand Down

0 comments on commit ead83b9

Please sign in to comment.